Advertisement
Dragonop

Untitled

Feb 21st, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. precio = 30
  2. cantidad = 7
  3.  
  4. Subtotal = cantidad * precio
  5. Resto = cantidad / 3
  6. X = Resto % 1
  7. Descuento = (Resto - X) * precio
  8. Total = Subtotal - Descuento
  9.  
  10.  
  11. print("Resto = {0}".format(Resto))
  12. print("X = {0}".format(X))
  13.  
  14. print("Subtotal = {0}".format(Subtotal))
  15. print("Descuento = {0}".format(Descuento))
  16. print("Total = {0}".format(Total))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement