Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. country = input()
  2. money_needed = float(input())
  3.  
  4. all_money = 0
  5.  
  6. while country != "End":
  7.     money = float(input())
  8.     all_money += money
  9.     if all_money >= money_needed:
  10.         print(f"Going to {country}!")
  11.         all_money = 0
  12.         country = input()
  13.         if country == "End":
  14.             break
  15.         money_needed = float(input())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement