Advertisement
Guest User

05. Travelling from 07.3 Nested Loops - Lab

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