Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- # Escribir un script que pida el radio de un círculo y devuelva
- # su area usando alguna funcion
- # area = pi * radio**2, pi=3.1416
- # Expresar el resultado con 2 cifras decimales
- def calcularArea(radio):
- return 3.1416 * radio ** 2
- entrada = float(input("INGRESE UN RADIO: "))
- print(f"Area: {calcularArea(entrada):.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement