Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- win = 0
- lost = 0
- tournament = input()
- while tournament != 'End of tournaments':
- games = int(input())
- for game in range(1, games + 1):
- team1 = int(input())
- team2 = int(input())
- if team1 > team2:
- print(f'Game {game} of tournament {tournament}: win with {team1 - team2} points.')
- win += 1
- else:
- print(f'Game {game} of tournament {tournament}: lost with {team2 - team1} points.')
- lost += 1
- tournament = input()
- print(f'{win / (win + lost) * 100:.2f}% matches win')
- print(f'{lost / (win + lost) * 100:.2f}% matches lost')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement