preguntar al usuario de cuánto dinero dispone usar un ciclo "While" para preguntarle que desea hacer con este dinero mientras el usuario tenga suficiente dinero para gastar. las opciones de gastos que puede hacer son: -ir al cine (30) -comer (70) -comprar accesorios (125) -comprar ropa (200) -Ahorrarlo (Cualquier cantidad) mostrar cada vez el balance restante y la acción realizada y mostrar únicamente las acciones que pueda realizar con el dinero disponible
def ask_user(total): while total > 0: print('You have ', total, 'to spend') choice = input('What do you want to spend your money on?\n' + '1) Cinema\n' + '2) Eat\n' + '3) Accessories\n' + '4) Clothes\n' + '5) Save money\n') if choice == '1': total = total - 30 print('You went to the cinema and spent $30. You now have $', total, 'left') elif choice == '2': total = total - 70 print('You went to the cinema and spent $70. You now have $', total, 'left') elif choice == '3': total = total - 125 print('You went to the cinema and spent $125. You now have $', total, 'left') elif choice == '4': total = total - 200 print('You went to the cinema and spent $200