Skip to content

Instantly share code, notes, and snippets.

@alphanetEX
Created Apr 27, 2020
Embed
What would you like to do?
Entrega 1B
def discount(price, result):
if result == 0:
return price - (price * 0.1)
elif result == 1:
return price - (price * 0.05)
else:
return price + (price * 0.15)
result = int(input(" pagar: \nefectivo: 0\ndebito: 1\ncredito: 2 (monto adicional del 15%)\n: "))
price = float(input("ingrese el precio del producto: "))
print("importe total a pagar es de: " + str(discount(price, result)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment