Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client_num = int(input())
- total_price = 0
- for i in range(client_num):
- command = input()
- item_price = 0
- item_num = 0
- while command != "Finish":
- if command == "basket":
- item_price += 1.50
- elif command == "wreath":
- item_price += 3.80
- elif command == "chocolate bunny":
- item_price += 7
- item_num += 1
- command = input()
- if item_num % 2 == 0:
- item_price *= 0.8
- total_price += item_price
- print(f"You purchased {item_num} items for {item_price:.2f} leva.")
- print(f"Average bill per client is: {total_price / client_num :.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement