Last active
November 2, 2020 16:09
-
-
Save soyHouston256/5212401b9d908df18aea4fca09e530f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| menu = """ | |
| Bienvenido al conversor de monedas | |
| 1.- Soles Peruanos | |
| 2.- Pesos Mexicanso | |
| 3.- Pesos Argentinos | |
| Elige una opcion: """ | |
| opcion = input(menu) | |
| def conversor(moneda,valor): | |
| monto = input("Cuantos "+moneda+" tienes?: ") | |
| moneda = moneda | |
| cantidad = float(monto) / valor | |
| cantidad = round(cantidad,2) | |
| return "Tus "+str(monto)+" "+moneda+" equivalen a " + str(cantidad) + " dolares" | |
| if opcion == "1": | |
| print(conversor("Soles",float(3.69))) | |
| elif opcion == "2": | |
| print(conversor("Pesos Mexicanos",float(18.90))) | |
| elif opcion == "3": | |
| print(conversor("Pesos Argentinos",float(12.90))) | |
| else: | |
| print("Ingrese una opcion valida") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment