Advertisement
Spocoman

Tennis Ranklist

Feb 22nd, 2022
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. tourney = int(input())
  2. points = int(input())
  3. win = 0
  4. total = 0
  5.  
  6. for i in range(tourney):
  7.     stage = input()
  8.     if stage == "W":
  9.         total += 2000
  10.         win += 1
  11.     elif stage == "F":
  12.         total += 1200
  13.     elif stage == "SF":
  14.         total += 720
  15.  
  16. print(f"Final points: {total + points}")
  17. print(f"Average points: {int(total / tourney)}")
  18. print(f"{win / tourney * 100:.2f}%")
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement