Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import ceil
- budget = float(input())
- guests = int(input())
- banana_price = float(input())
- egg_price = float(input())
- berries_kilo_price = float(input())
- needed_money = ceil(guests / 6) * (banana_price * 2 + egg_price * 4 + berries_kilo_price / 5)
- if budget >= needed_money:
- print(f"Ivancho has enough money - it would cost {needed_money:.2f}lv.")
- else:
- print(f"Ivancho will have to withdraw money - he will need {needed_money - budget:.2f}lv more.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement