Advertisement
simeonshopov

Football League

Oct 17th, 2019
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. capasity = int(input())
  2. fans = int(input())
  3. sectors = ["A", "B", "V", "G"]
  4. places = [0, 0, 0, 0]
  5.  
  6. for i in range(fans):
  7.   sec_loc = input()
  8.   index = sectors.index(sec_loc)
  9.   if sec_loc in sectors:
  10.     places[index] += 1
  11.    
  12. print(f"{((places[0] / fans) * 100):.2f}%")
  13. print(f"{((places[1] / fans) * 100):.2f}%")
  14. print(f"{((places[2] / fans) * 100):.2f}%")
  15. print(f"{((places[3] / fans) * 100):.2f}%")
  16. print(f"{((fans / capasity) * 100):.2f}%")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement