Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name = input()
- number_games = int(input())
- w = 0
- d = 0
- l = 0
- total = 0
- for i in range(number_games):
- result = input()
- if result == "W":
- w += 1
- elif result == "D":
- d += 1
- elif result == "L":
- l += 1
- total = w *3 + d * 1 + l * 0
- if (w + d + l) == 0:
- print(f"{name} hasn't played any games during this season.")
- else:
- print(f"{name} has won {total} points during this season.")
- print("Total stats:")
- print(f"## W: {w}")
- print(f"## D: {d}")
- print(f"## L: {l}")
- print(f"Win rate: {((w / (w + d + l)) * 100):.2f}%")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement