Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- playersA = ["A-1", "A-2", "A-3", "A-4", "A-5", "A-6", "A-7", "A-8", "A-9", "A-10", "A-11"]
- playersB = ["B-1", "B-2", "B-3", "B-4", "B-5", "B-6", "B-7", "B-8", "B-9", "B-10", "B-11"]
- commands = input().split(' ')
- counterA = 0
- counterB = 0
- new_listA = []
- new_listB = []
- for command in commands:
- if new_listA.__contains__(command):
- continue
- elif new_listB.__contains__(command):
- continue
- if len(playersA) < 7 or len(playersB) < 7:
- break
- if command == "A-1":
- playersA.remove('A-1')
- new_listA.append(command)
- counterA += 1
- elif command == "A-2":
- playersA.remove('A-2')
- new_listA.append(command)
- counterA += 1
- elif command == "A-3":
- playersA.remove('A-3')
- new_listA.append(command)
- counterA += 1
- elif command == "A-4":
- playersA.remove('A-4')
- new_listA.append(command)
- counterA += 1
- elif command == "A-5":
- playersA.remove('A-5')
- new_listA.append(command)
- counterA += 1
- elif command == "A-6":
- playersA.remove('A-6')
- new_listA.append(command)
- counterA += 1
- elif command == "A-7":
- playersA.remove('A-7')
- new_listA.append(command)
- counterA += 1
- elif command == "A-8":
- playersA.remove('A-8')
- new_listA.append(command)
- counterA += 1
- elif command == "A-9":
- playersA.remove('A-9')
- new_listA.append(command)
- counterA += 1
- elif command == "A-10":
- playersA.remove('A-10')
- new_listA.append(command)
- counterA += 1
- elif command == "A-11":
- playersA.remove('A-11')
- new_listA.append(command)
- counterA += 1
- elif command == "B-1":
- playersB.remove('B-1')
- new_listB.append(command)
- counterB += 1
- elif command == "B-2":
- playersB.remove('B-2')
- new_listB.append(command)
- counterB += 1
- elif command == "B-3":
- playersB.remove('B-3')
- new_listB.append(command)
- counterB += 1
- elif command == "B-4":
- playersB.remove('B-4')
- new_listB.append(command)
- counterB += 1
- elif command == "B-5":
- playersB.remove('B-5')
- new_listB.append(command)
- counterB += 1
- elif command == "B-6":
- playersB.remove('B-6')
- new_listB.append(command)
- counterB += 1
- elif command == "B-7":
- playersB.remove('B-7')
- new_listB.append(command)
- counterB += 1
- elif command == "B-8":
- playersB.remove('B-8')
- new_listB.append(command)
- counterB += 1
- elif command == "B-9":
- playersB.remove('B-9')
- new_listB.append(command)
- counterB += 1
- elif command == "B-10":
- playersB.remove('B-10')
- new_listB.append(command)
- counterB += 1
- elif command == "B-11":
- playersB.remove('B-11')
- new_listB.append(command)
- counterB += 1
- team_one = 11 - counterA
- team_two = 11 - counterB
- if team_one < 7 or team_two < 7:
- print(f"Team A - {team_one}; Team B - {team_two}")
- print("Game was terminated")
- else:
- print(f"Team A - {team_one}; Team B - {team_two}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement