Well done!
You have completed Math and Recursive Function Quiz!
Quiz Question 1 of 5
Consider the following recursive function for calculating factorial. What will be the result if the input is a negative integer?
def rec_fact(n):
if n < 0:
print("error")
elif n == 0:
return 1
else:
return n * rec_fact(n - 1)
Choose the correct answer below: