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