Advertisement
Guest User

Algoritmos_Compra

a guest
Mar 20th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. nombre = input('Cual es su nombre? ')
  2. print()
  3.  
  4. dinero = input('Cuanto dinero posee? ')
  5. print()
  6.  
  7. helado = 1000
  8.  
  9. print('Cuantos helados quiere? Cada Helado tiene un valor de $1000 ' )
  10. cantidad = input()
  11. print()
  12.  
  13. total = int(cantidad)*int(helado)
  14. vuelto = int(dinero)-total
  15.  
  16. if total > int(dinero):
  17.     print('NO PUEDES COMPRAR, ERES MUY POBRE ')
  18. elif total <= int(dinero):
  19.     print('EL TOTAL ES DE ' + str(total))
  20.     print('SU VUELTO ES DE:' + str(vuelto))
  21. input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement