Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Factorial finder recursive function
- def f(x):
- if x == 1: # base case
- return 1
- else:
- return x * f(x-1) # recursion case
- # Test:
- print(f(994)) # the biggest number for Python to calculate the factorial of
Add Comment
Please, Sign In to add comment