Teo_Yanchev

fitness_center_9-10-2019_exam

Jul 15th, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. entered_people = int(input())
  2.  
  3.  
  4. back = 0
  5. chest = 0
  6. legs = 0
  7. abs = 0
  8. shake = 0
  9. bar = 0
  10.  
  11. for people in range(1, entered_people+1):
  12. activity = input()
  13. if activity == "Back":
  14. back += 1
  15. elif activity == "Chest":
  16. chest += 1
  17. elif activity == "Legs":
  18. legs += 1
  19. elif activity == "Abs":
  20. abs += 1
  21. elif activity == "Protein shake":
  22. shake += 1
  23. else:
  24. bar += 1
  25. training = ((back + chest + legs + abs) / entered_people) * 100
  26. product = ((shake + bar) / entered_people) * 100
  27. print(f"{back} - back")
  28. print(f"{chest} - chest")
  29. print(f"{legs} - legs")
  30. print(f"{abs} - abs")
  31. print(f"{shake} - protein shake")
  32. print(f"{bar} - protein bar")
  33. print(f"{training:.2f}% - work out")
  34. print(f"{product:.2f}% - protein")
Add Comment
Please, Sign In to add comment