Nephelir

Football Cards

Feb 2nd, 2021
1,116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. card = input().split()
  2.  
  3. team_a = 11
  4. team_b = 11
  5. is_terminated = False
  6.  
  7. for letter in card:
  8.  
  9.     if 'A' in letter:
  10.         team_a -= 1
  11.     elif 'B' in letter:
  12.         team_b -= 1
  13.  
  14.     if team_a < 7 or team_b < 7:
  15.         is_terminated = True
  16.         break
  17.  
  18. print(f'Team A - {team_a}; Team B - {team_b}')
  19.  
  20. if is_terminated:
  21.     print('Game was terminated')
Advertisement
Add Comment
Please, Sign In to add comment