Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 07. Football League
- capacity = int(input())
- fens = int(input())
- sector = ''
- secA = 0
- secB = 0
- secV = 0
- secG = 0
- i = 0
- while i < fens:
- sector = input()
- if sector == "A":
- secA += 1
- elif sector == "B":
- secB += 1
- elif sector == "V":
- secV += 1
- elif sector == "G":
- secG += 1
- i += 1
- secA = secA / fens * 100
- secB = secB / fens * 100
- secV = secV / fens * 100
- secG = secG / fens * 100
- average_fens = fens / capacity * 100
- print(f"{secA:.2f}%")
- print(f"{secB:.2f}%")
- print(f"{secV:.2f}%")
- print(f"{secG:.2f}%")
- print(f"{average_fens:.2f}%")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement