Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- #Programa que calcula superficies y perímetros:
- from geometria import area_circulo as circulo, area_triangulo as triangulo
- from geometria import ingresar
- print("Programa que calcula superficies")
- while True:
- print("""
- Menu de opciones:
- ----------------
- 1. Círculo
- 2. Triángulo rectángulo
- 3. Salir
- """)
- opcion = input("Elija su opcion: ")
- if opcion == "1":
- radio = ingresar("radio")
- print(f"El area es {circulo(radio)}")
- elif opcion == "2":
- base = ingresar("base")
- altura = ingresar("altura")
- print(f"El area es {triangulo(base, altura)}")
- elif opcion == "3":
- print("Gracias por usar este programa...")
- break
- else:
- print("Opción incorrecta")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement