Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- visitors = int(input())
- back = 0
- chest = 0
- legs = 0
- abs = 0
- protein_shake = 0
- protein_bar = 0
- for i in range(visitors):
- action = input()
- if action == "Back":
- back += 1
- elif action == "Chest":
- chest += 1
- elif action == "Legs":
- legs += 1
- elif action == "Abs":
- abs += 1
- elif action == "Protein shake":
- protein_shake += 1
- elif action == "Protein bar":
- protein_bar += 1
- print(f"{back} - back")
- print(f"{chest} - chest")
- print(f"{legs} - legs")
- print(f"{abs} - abs")
- print(f"{protein_shake} - protein shake")
- print(f"{protein_bar} - protein bar")
- print(f"{(back + chest + legs + abs) / visitors * 100:.2f}% - work out")
- print(f"{(protein_shake + protein_bar) / visitors * 100:.2f}% - protein")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement