Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- guest = int(input())
- budget = float(input())
- total_sum = math.ceil(guest / 3) * 4 + guest * 2 * 0.45
- if budget >= total_sum:
- print(f"Lyubo bought {math.ceil(guest / 3)} Easter bread and {guest * 2} eggs.")
- print(f"He has {budget - total_sum:.2f} lv. left.")
- else:
- print("Lyubo doesn't have enough money.")
- print(f"He needs {total_sum - budget:.2f} lv. more.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement