πŸ“Š Python
Q. What will be the output of the following code snippet?
Code:
def solve(a, b):
   return b if a == 0 else solve(b % a, a)
print(solve(20, 50))
  • (A) 10
  • (B) 20
  • (C) 50
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (A) 10

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
412
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Akash Lawaniya
Publisher
πŸ“ˆ
92%
Success Rate