Advertisement
teslariu

potencia

Nov 30th, 2021
1,014
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. """
  5. Programa que calcula potencias de números
  6. """
  7. __author__ = "Yo, el mejor"
  8. __copyright__ = "Curso de Python"
  9. __credits__ = ["Cesar","Mauro"]
  10. __license__ = "GPL"
  11. __version__ = "1.0"
  12. __email__ = "[email protected]"
  13. __status__ = "Development"
  14.  
  15.  
  16. def cubo(x):
  17.     """Función que recibe un nro y devuelve su cubo"""
  18.     return x**3
  19.  
  20. if __name__ == "__main__":
  21.     x = int(input("Ingrese un entero"))
  22.     y = cubo(x)
  23.     print(f"El cubo de {x} es {y}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement