Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player1 = input()
- player2 = input()
- point1 = 0
- point2 = 0
- while True:
- command = input()
- if command == "End of game":
- print(f"{player1} has {point1} points")
- print(f"{player2} has {point2} points")
- break
- card01 = int(command)
- card02 = int(input())
- if card01 > card02:
- point1 += card01 - card02
- elif card01 < card02:
- point2 += card02 - card01
- else:
- card01 = int(input())
- card02 = int(input())
- print("Number wars!")
- if card01 > card02:
- print(f"{player1} is winner with {point1} points")
- else:
- print(f"{player2} is winner with {point2} points")
- break
Add Comment
Please, Sign In to add comment