Created
April 27, 2020 11:45
-
-
Save alphanetEX/12cbb3b97b2eaf605680624a10b9d27d to your computer and use it in GitHub Desktop.
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