Q:

What will be the output? ef fact(num): if num == 0: return 1 else: return _____________________

0

What will be the output? 

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.

 


  1. num*fact(num-1)
  2. (num-1)*(num-2)
  3. num*(num-1)
  4. fact(num)*fact(num-1)

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:

num*fact(num-1)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Python Multiple Choice Questions And Answers

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What will be the output of the following Python co... >>
<< What will be the output of the following Python co...