Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- guests=int(input())
- gifts=int(input())
- kindA=0
- kindB=0
- kindV=0
- kindG=0
- for i in range(gifts):
- kind=input()
- if(kind=='A'):
- kindA+=1
- elif(kind=='B'):
- kindB+=1
- elif(kind=='V'):
- kindV+=1
- elif(kind=='G'):
- kindG+=1
- perA=kindA/gifts*100
- perB=kindB/gifts*100
- perV=kindV/gifts*100
- perG=kindG/gifts*100
- perWhole=gifts/guests*100
- print(f'{perA:.2f}%')
- print(f'{perB:.2f}%')
- print(f'{perV:.2f}%')
- print(f'{perG:.2f}%')
- print(f'{perWhole:.2f}%')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement