Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = float(input())
- flour_kg = float(input())
- easter_bread = 0
- colored_eggs = 0
- easter_bread_price = flour_kg * 1.75 + flour_kg * 1.25 / 4
- while budget >= easter_bread_price:
- budget -= easter_bread_price
- colored_eggs += 3
- easter_bread += 1
- if easter_bread % 3 == 0:
- colored_eggs -= easter_bread - 2
- print(f"You made {easter_bread} loaves of Easter bread! Now you have {colored_eggs} eggs and {budget:.2f}BGN left.")
- Или леко тарикатската:)
- budget = float(input())
- easter_bread_price = float(input()) * 2.0625
- easter_bread = 0
- colored_eggs = 0
- while budget >= easter_bread_price:
- budget -= easter_bread_price
- colored_eggs += 3
- easter_bread += 1
- if easter_bread % 3 == 0:
- colored_eggs -= easter_bread - 2
- print(f"You made {easter_bread} loaves of Easter bread! Now you have {colored_eggs} eggs and {budget:.2f}BGN left.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement