Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cats = int(input())
- small = 0
- big = 0
- large = 0
- total_food = 0
- for i in range(cats):
- food = float(input())
- total_food += food
- if 100 <= food < 200:
- small += 1
- elif 200 <= food < 300:
- big += 1
- elif 300 <= food < 400:
- large += 1
- price = total_food / 1000 * 12.45
- print(f"Group 1: {small} cats.")
- print(f"Group 2: {big} cats.")
- print(f"Group 3: {large} cats.")
- print(f"Price for food per day: {price:.2f} lv.")
Add Comment
Please, Sign In to add comment