Entrega 1B
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 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