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