Advertisement
teslariu

cubo

Oct 25th, 2021
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. """
  5. Programa que calcula el cubo de un número
  6. """
  7. __author__ = "pepe"
  8. __copyright__ ="Curso de Python"
  9. __credits__ = ["Juan","Cacho"]
  10. __license__ = "GPL"
  11. __version__ = "1.0"
  12. __email__ = "ale@ale.com"
  13. __status__ = "Development"
  14.  
  15.  
  16. def cubo(x):
  17.     """Calcula el cubo de un nro"""
  18.     y = x**3
  19.     return y
  20.    
  21. if __name__ == "__main__":
  22.     x = int(input("Ingrese un nro: "))
  23.     print(f"El cubo de {x} es {cubo(x)}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement