Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = int(input())
- while True:
- line = input()
- if line == "End":
- print("You bought everything needed.")
- break
- price = int(line)
- if budget >= price:
- budget -= price
- else:
- print("You went in overdraft!")
- break
Advertisement
Add Comment
Please, Sign In to add comment