Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def factorial(numero):
- """
- Calcula el factorial de un número de forma recursiva.
- """
- if numero == 1:
- return 1
- else:
- return numero * factorial(numero - 1)
- print(factorial(7))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement