Trường Phan
New member
Fill in the line of the following Python code for calculating the factorial of a number.
A. num*fact(num-1)
B. (num-1)*(num-2)
C. num*(num-1)
D. fact(num)*fact(num-1)
Code:
def fact(num):
if num == 0:
return 1
else:
return _____________________
B. (num-1)*(num-2)
C. num*(num-1)
D. fact(num)*fact(num-1)