πŸ“Š Python
Q. What will be the output?
Code:
ef fact(num): if num == 0: return 1 else: return _____________________ Suppose n=5 then, 5*4*3*2*1 is returned which is the factorial of 5.
  • (A) num*fact(num-1)
  • (B) (num-1)*(num-2)
  • (C) num*(num-1)
  • (D) fact(num)*fact(num-1)
πŸ’¬ Discuss
βœ… Correct Answer: (A) num*fact(num-1)

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
235
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Tanmay
Publisher
πŸ“ˆ
88%
Success Rate