Advertisement
Dimitar46

02. Football Results

Jul 2nd, 2022
685
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. resultFirstMatch = input()
  2. resultSecondMatch = input()
  3. resultThirdMatch = input()
  4. results = [resultFirstMatch, resultSecondMatch, resultThirdMatch]
  5. won = 0
  6. draws = 0
  7. loses = 0
  8.  
  9. for i in range(len(results)):
  10.     arr = results[i].split(":")
  11.     if arr[0] > arr[1]:
  12.         won += 1
  13.     elif arr[0] < arr[1]:
  14.         loses += 1
  15.     else:
  16.         draws += 1
  17.  
  18. print(f"Team won {won} games.")
  19. print(f"Team lost {loses} games.")
  20. print(f"Drawn games: {draws}")
  21.  
Advertisement
RAW Paste Data Copied
Advertisement