Can anyone debug this? TicTacToe assignment
import random #FUNCTIONS def int_input(choice): try: int(choice) / 1 return True except ValueError: return False def print_board(board): rowIndex = 0 for row in board: rowIndex += 1 index = 0 for spot in row: index += 1 if index != len(row): print("" , spot , "|" , end = "") else: print("" , spot, end = "") if rowIndex != len(board): print("\n --+---+--") print ("\n") def user_choice(turn): if turn == 1: print_board(board) choice = input(player1 + " enter your move: ") while int_input(choice) == False: choice = input("That choice is not an integer 1-9, where would you like to go? ") while spot_filled(choice) == True: choice = input("That choice is already taken, where would you like to go? ") choice = int(choice) change_board(choice , 1) if turn == 2: print_board(board) choice = input(player2 + " where would you like to go? ") while int_input(choice) == False: choice = input("That choice is not an integer 1-9, where would you like to go? ") while spot_filled(choice) == True: choice = input("That choice is already taken, where would you like to go? ") choice = int(choice) change_board(choice , 2) def change_board(choice , turn): yIndex = ((choice -1) - (choice - 1) % 3) // 3 xIndex = (choice - 1) % 3 if turn == 1: board[yIndex][xIndex] = symbol1 if turn == 2: board[yIndex][xIndex] = symbol2 def spot_filled(choice): while int_input(choice) == False: choice = input("That choice is not an integer 1-9, where would you like to go? ") choice = int(choice) yIndex = ((choice - 1) - (choice - 1) % 3) // 3 xIndex = (choice - 1) % 3 if board[yIndex][xIndex] == symbol1 o