Skip to content

Instantly share code, notes, and snippets.

@alphanetEX
Created April 27, 2020 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alphanetEX/12cbb3b97b2eaf605680624a10b9d27d to your computer and use it in GitHub Desktop.
Save alphanetEX/12cbb3b97b2eaf605680624a10b9d27d to your computer and use it in GitHub Desktop.
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