Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cubo_tres():
- """
- Retorna el cubo de 3.
- """
- return 3 * 3
- print(cubo_tres())
- print()
- def factorial(num):
- """
- Calcula el factorial de un número dado.
- """
- fact = 1;
- idx = 1;
- while idx <= num:
- fact *= idx
- idx += 1
- return fact
- print(factorial(7))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement