desislava_topuzakova

05. Travelling

Nov 7th, 2020
2,353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. destination = input()
  2.  
  3. #спираме destination == "End"
  4. while destination != "End":
  5.     min_budget = float(input())
  6.     #спира да събира: парите >= мин.бюджет
  7.     sum = 0
  8.     while sum < min_budget:
  9.         saved_money = float(input())
  10.         sum += saved_money
  11.     else:
  12.         print(f"Going to {destination}!")
  13.  
  14.     destination = input()
Advertisement
Add Comment
Please, Sign In to add comment