Are you sure?
Do you want to delete “Factorial” permanently? You will not be able to undo this action.
def fact(n):
result = 1
for i in range(1, n + 1):
result *= i
return result
def fact_recursive(n):
if n == 1:
result = 1
else:
result = n * fact_recursive(n-1)
return result
Text(fact_recursive(2))