Advertisement
teslariu

modulos2

Apr 7th, 2022
914
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. Script que calcula el cubo de un nro
  5. """
  6. __author__ = "ALB"
  7. __copyright__ = "Curso de Python"
  8. __credits__ = ["Ale","Jhoan","Hernan"]
  9. __license__ = "GPL"
  10. __version__ = "3.0"
  11. __email__ = "tatuss@ciudad.com.ar"
  12. __status__ = "Development"
  13.  
  14. def cubo(x):
  15.     """Función que pide un número y retorna su cubo"""
  16.     return x**3
  17.  
  18. if __name__ == "__main__":
  19.     x = int(input("Dame un nro entero: "))
  20.     y = cubo(x)
  21.     print(f"El cubo de {x} es {y}")
Advertisement
RAW Paste Data Copied
Advertisement