Created
September 7, 2019 21:44
-
-
Save brandon22esquivel/e4aacd9825477d0ac0c394917dbc0256 to your computer and use it in GitHub Desktop.
This file contains 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
def calcularcambio(precioproducto,monto): | |
return monto - precioproducto | |
def iniciar(monto): | |
dulce = raw_input("Elija la letra: ") | |
if dulce == "a": | |
precioproducto = 2.5 | |
print "Su cambio es de ", calcularcambio(precioproducto, monto) | |
elif dulce == "b": | |
precioproducto = 1.4 | |
print "Su cambio es de ", calcularcambio(precioproducto, monto) | |
elif dulce == "c": | |
precioproducto = 1.2 | |
print "Su cambio es de ", calcularcambio(precioproducto, monto) | |
monto = input("Ingrese el monto: ") | |
if monto < 5: | |
print iniciar(monto) | |
else: | |
print "Monto debe ser menor a 5" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment