Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def factorial (num):
- if num <= 1:
- return num
- else:
- return num * factorial(num - 1)
- print(factorial(5))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement