Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- name = input()
- budget = float(input())
- beers = float(input()) * 1.2
- chips = float(input()) * beers * 0.45
- total = beers + math.ceil(chips)
- if budget < total:
- print(f'{name} needs {total - budget:.2f} more leva!')
- else:
- print(f'{name} bought a snack and has {budget - total:.2f} leva left.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement