Advertisement
HristoBaychev

Traveling

Feb 12th, 2023
1,184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. destination = input()
  2. saved_money = 0
  3. while destination != 'End':
  4.     need_money = float(input())
  5.     while saved_money <= need_money:
  6.         money = float(input())
  7.         saved_money += money
  8.         if saved_money >= need_money:
  9.             print(f"Going to {destination}!")
  10.             break
  11.     saved_money = 0
  12.     destination = input()
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement