Advertisement
Guest User

Untitled

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