Advertisement
teslariu

cuad

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