It will carry on if the input is X but not O!!
block of code concerning this matter
print("\nWould you like be X's or O's ? <O/X>:")
human=["",""]
while not (("X") or ("O")) in human[0]:
human[0]=input("")
whole code:
print("Welcome to the greatest intelletual challenge of all time: Tic Tac Toe.")
print("This will be a showdown between your human brain and my silicon processor.\n")
board=["","","","","","","",""]
def display_board(board):
print(board[1],""" |""",board[1],""" |""",board[3])
print(""" -------------""")
print(board[1],""" |""",board[1],""" |""",board[3])
print(""" -------------""")
print(board[1],""" |""",board[1],""" |""",board[3])
def instructions():
print("You will make you move known by entering a number, 0 - 8. The number will correspond to the board posistion as illustrated:")
display_board(board)
def settings(board):
print("\nWould you like be X's or O's ? <O/X>:")
human=["",""]
while not (("X") or ("O")) in human[0]:
human[0]=input("")
if human==("X"):
computer=["O",""]
else:
computer=["X",""]
print("\nDo you require the first go? <Y/N>:")
human[1]=input("")
if human[1]==("Y"):
computer[1]=("N")
else:
computer[1]=("Y")
instructions()
print("Prepare youself, human. The ultimate battle is about to begin.")
settings(board)