Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- Hearthstone_counter = 0
- Fornite_counter = 0
- Overwatch_counter = 0
- Others_counter = 0
- for i in range(n):
- game = input()
- if game == "Hearthstone":
- Hearthstone_counter += 1
- elif game == "Fornite":
- Fornite_counter += 1
- elif game == "Overwatch":
- Overwatch_counter += 1
- elif game not in ["Hearthstone", "Fornite", "Overwatch"]:
- Others_counter += 1
- print(f"Hearthstone - {((Hearthstone_counter / n) * 100):.2f}%")
- print(f"Fornite - {((Fornite_counter / n) * 100):.2f}%")
- print(f"Overwatch - {((Overwatch_counter / n) * 100):.2f}%")
- print(f"Others - {((Others_counter / n) * 100):.2f}%")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement