Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- broi_uchastnici = int(input())
- prihod = 0
- cookies_n = 0
- waffles_n = 0
- cakes_n = 0
- sladkishi = 0
- command = ''
- for i in range(1,broi_uchastnici+1):
- ime = input()
- while True:
- sladkish_type = input()
- if sladkish_type == 'Stop baking!':
- print(f'{ime} baked {cookies_n} cookies, {cakes_n} cakes and {waffles_n} waffles.')
- cakes_n = 0
- waffles_n = 0
- cookies_n = 0
- break
- sladkish_n = int(input())
- if sladkish_type == 'cookies':
- prihod += (1.50*sladkish_n)
- cookies_n += sladkish_n
- elif sladkish_type == 'cakes':
- prihod += (7.80 * sladkish_n)
- cakes_n += sladkish_n
- elif sladkish_type == 'waffles':
- prihod += (2.30 * sladkish_n)
- waffles_n += sladkish_n
- sladkishi += sladkish_n
- print(f'All bakery sold: {sladkishi}')
- print(f'Total sum for charity: {prihod:.2f} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement