Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- players = int(input())
- sum_total = 0
- total_baked = 0
- for i in range(1, players + 1):
- name = input()
- item = input()
- cookies = 0
- cakes = 0
- waffles = 0
- while item != "Stop baking!":
- count = int(input())
- if item == "cookies":
- cookies += count
- sum_total += count * 1.50
- elif item == "cakes":
- cakes += count
- sum_total += count * 7.80
- elif item == "waffles":
- waffles += count
- sum_total += count * 2.30
- total_baked += count
- item = input()
- else:
- print(f"{name} baked {cookies} cookies, {cakes} cakes and {waffles} waffles.")
- print(f"All bakery sold: {total_baked}")
- print(f"Total sum for charity: {sum_total:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment