Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- first_name = input()
- second_name = input()
- first_player_pt = 0
- second_player_pt = 0
- playing_game = True
- while playing_game:
- first_player = int(input())
- second_player = int(input())
- if first_player > second_player:
- first_player_pt = first_player - second_player
- elif second_player > first_player:
- second_player_pt = second_player - first_player
- else:
- print('Number wars!')
- while True:
- first_player = int(input())
- second_player = int(input())
- if first_player > second_player:
- first_player_pt = first_player - second_player
- break
- elif second_player > first_player:
- second_player_pt = second_player - first_player
- break
- else:
- continue
- playing_game = False
- if first_player_pt > second_player_pt:
- print(f'{first_name} is winner with {first_player_pt} points')
- else:
- print(f'{second_name} is winner with {second_player_pt} points')
Add Comment
Please, Sign In to add comment