Question
Consider the following Python code: Â Â def
mystery(a, b):     if a == 0:       return b     else:       return mystery(b % a, a)   print(mystery(15, 20))   What is the output of this code?Solution
This is the Euclidean algorithm for finding the Greatest Common Divisor (GCD). Â Â 1. mystery(15, 20): a is not 0. Calls mystery(20 % 15, 15) which is mystery(5, 15). Â Â 2. mystery(5, 15): a is not 0. Calls mystery(15 % 5, 5) which is mystery(0, 5). Â Â 3. mystery(0, 5): a is 0. Returns b, which is 5. Â Â The final output is 5.
Another name of Carborundum is
Which of the following elements is a noble gas?
The substance that is added to make natural rubber strong and more bouncy is-
What is the primary component in silver-colored paints?
For making of parachute, which polymeric substance used?
What element is used to coat galvanized iron?
Which enzyme is derived from soybeans?
What is the colour of base?
What are proteins chemically composed of?
What term is used for atoms that have the same number of protons but different numbers of neutrons?