Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- budget = float(input())
- flour_price = float(input())
- eggs_pack_price = flour_price * 0.75
- milk_price = flour_price * 1.25
- cozonacs_price = flour_price + eggs_pack_price + milk_price / 4
- cozonacs_count = 0
- colored_eggs = 0
- while budget >= cozonacs_price:
- cozonacs_count += 1
- budget -= cozonacs_price
- colored_eggs += 3
- if cozonacs_count % 3 == 0:
- colored_eggs -= (cozonacs_count - 2)
- else:
- print(f'You made {cozonacs_count} cozonacs! Now you have {colored_eggs} eggs and {budget:.2f}BGN left.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement