Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- planned_cakes = int(input())
- cake_flour = float(input())
- flour_available = int(input())
- truffle_count = int(input())
- truffle_price = int(input())
- cakes = int(flour_available / cake_flour)
- if cakes >= planned_cakes:
- cake_price = truffle_count * truffle_price / planned_cakes * 1.25
- print(f"All products available, price of a cake: {cake_price:.2f}")
- else:
- flour_needed = planned_cakes * cake_flour - flour_available
- print(f"Can make only {cakes} cakes, need {flour_needed:.2f} kg more flour")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement