# File: factorial3.py # # Compute the factorial recursively def fac(n): product = 1 for i in range(2,n+1): product = product * i return product def recFac(n): if (n <= 1): return 1 # Can use either of these calls next and get the right answer return n * Fac(n-1) # not a recursive call # return n * recFac(n-1) # is a recursive call def main(): print("3! =", recFac(3)) print("5! =", recFac(5)) print("17! =", recFac(17)) print("93! =", recFac(93)) main()