Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import floor
- count_tournaments = int(input())
- start_scores = int(input())
- check_count_tours = count_tournaments
- list_scores = []
- list_w = []
- list_f = []
- list_sf = []
- while check_count_tours != 0:
- level = input()
- if level == 'W':
- list_w.append(2000)
- list_scores.append(2000)
- elif level == 'F':
- list_f.append(1200)
- list_scores.append(1200)
- elif level == 'SF':
- list_sf.append(720)
- list_scores.append(720)
- check_count_tours -= 1
- total_scores = start_scores + sum(list_w) + sum(list_f) + sum(list_sf)
- len_list_scores = len(list_scores)
- sum_list_scores = sum(list_scores)
- average_scores = sum_list_scores / len_list_scores
- len_list_w = len(list_w)
- percent_tours = (len_list_w / len_list_scores) * 100
- print(f"Final points: {total_scores}")
- print(f"Average points: {floor(average_scores)}")
- print(f"{percent_tours:.2f}%")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement