budget float input flour_price float input egg_price flour_price milk_

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
budget = float(input())
flour_price = float(input())
egg_price = flour_price * 3 / 4
milk_price = flour_price * 5 / 16
cozanac_price = flour_price + egg_price + milk_price
color_eggs = 0
count = 0
while budget - cozanac_price > 0:
count += 1
color_eggs += 3
if count % 3 == 0:
color_eggs -= count - 2
budget -= cozanac_price
print(f"You made {count} cozonacs! Now you have {color_eggs} eggs and {budget:.2f}BGN left.")