Advertisement
BbJLeB

02. Football Results

May 21st, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.91 KB | None | 0 0
  1. firts = input()
  2. second = input()
  3. third = input()
  4. win = 0
  5. loose = 0
  6. drown = 0
  7.  
  8. first_game_left_part = firts[0]
  9. first_game_right_part = firts[-1:]
  10.  
  11. second_game_left = second[0]
  12. second_game_right = second[-1:]
  13.  
  14. third_game_left = third[0]
  15. third_game_right = third[-1:]
  16.  
  17. if first_game_left_part > first_game_right_part:
  18.     win += 1
  19. elif first_game_left_part < first_game_right_part:
  20.     loose += 1
  21. elif first_game_right_part == first_game_left_part:
  22.     drown += 1
  23.  
  24. if second_game_left > second_game_right:
  25.     win += 1
  26. elif second_game_left < second_game_right:
  27.     loose += 1
  28. elif second_game_right == second_game_left:
  29.     drown += 1
  30.  
  31. if third_game_left > third_game_right:
  32.     win += 1
  33. elif third_game_left < third_game_right:
  34.     loose += 1
  35. elif third_game_right == third_game_left:
  36.     drown += 1
  37.  
  38. print(f"Team won {win} games.")
  39. print(f"Team lost {loose} games.")
  40. print(f"Drawn games: {drown}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement