Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 05. Tennis Ranklist
- import math
- tournament = int(input())
- start_points = int(input())
- current_points = 0
- all_wins = 0
- moment_points = 0
- for i in range(tournament):
- stage = input()
- if stage == "W":
- current_points += 2000
- moment_points += 2000
- all_wins += 1
- elif stage == "F":
- current_points += 1200
- moment_points += 1200
- else:
- current_points += 720
- moment_points += 720
- final_points = current_points + start_points
- average_points = math.floor(moment_points / tournament)
- win_tournaments = (all_wins/ tournament) * 100
- print(f"Final points: {final_points}")
- print(f"Average points: {average_points}")
- print(f"{win_tournaments:.2f}%")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement