Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. first_guy = input()
  2. second_guy = input()
  3. first_score = 0
  4. second_score = 0
  5. card1 = input()
  6.  
  7. while card1 != "End of game":
  8. card1 = int(card1)
  9. card2 = int(input())
  10. if card1 > card2:
  11. first_score += card1 - card2
  12. elif card2 > card1:
  13. second_score += card2 - card1
  14. else:
  15. print("Number wars!")
  16. card1 = int(input())
  17. card2 = int(input())
  18. while card1 == card2:
  19. card1 = int(input())
  20. card2 = int(input())
  21. if card1 > card2:
  22. war_score = first_score
  23. print(f"{first_guy} is winner with {war_score} points")
  24. break
  25. else:
  26. war_score = second_score
  27. print(f"{second_guy} is winner with {war_score} points")
  28. break
  29. card1 = input()
  30. if card1 == "End of game":
  31. print(f"{first_guy} has {first_score} points")
  32. print(f"{second_guy} has {second_score} points")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement