A

Admin • 828.03K Points
Coach

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)
  • Correct Answer - Option(A)
  • Views: 10
  • Filed under category Python
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.