Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- # bibliotecas (library) ---> abuso: librería
- # una biblioteca es un comjunto de módulos funcionales
- # un módulo funcional es un archivo .py con funciones
- # la biblioteca std de Python tiene muchos módulos incorporados, entre ellos,
- # el módulo math
- # Voy a crear un módulo cuadrado
- import math
- def area(lado):
- return lado**2
- def perimetro(lado):
- return 4*lado
- def diagonal(lado):
- return math.sqrt(2 * lado**2)
Advertisement
Add Comment
Please, Sign In to add comment