input: Write a function to create an AI-based Tic-Tac-Toe game using Python. The function should include methods to draw the game board, check for a win condition, and determine the computer's move. The game should alternate turns between the human player (marked 'X') and the computer (marked 'O'). If the human player inputs an already filled spot, the game should prompt the player to choose another spot. The game should continue until one player wins or the game ends in a draw. The function should start the game when called.
  
  def playGame():
      board = ['-' for x in range(10)] 
      won = False
      turn = -1
      while not won: 
          if turn == -1: 
              # human turn   
              humanSpot = int(input("Enter your spot: "))
              if board[humanSpot] == '-': 
                  board[humanSpot] = 'X' 
              else: 
                  print("the spot is already filled!") 
                  continue
              turn *= -1
         
          if checkWin(board,'X'): 
              drawBoard(board) 
              print("You won!") 
              won = True
              break
            
          if turn == 1: 
              # computer turn  
              computerSpot = getComputerSpot(board,'O') 
              if computerSpot == None: 
                  drawBoard(board) 
                  print("The game is drawn!")
                  break
              else: 
                  board[computerSpot] = 'O' 
              turn *= -1
                
          drawBoard(board)
  
  assert playGame() is None
  assert getComputerSpot(['-', 'X', 'O', 'X', 'O', 'X', 'O', '-', '-', '-'], 'O') in [7, 8, 9]
  assert checkWin(['-', 'X', 'X', 'X', 'O', 'O', '-', '-', '-', '-'], 'X') == True
  assert checkWin(['-', 'X', 'O', 'X', 'O', 'X', 'O', '-', '-', '-'], 'O') == False
output: def playGame():
      board = ['-' for x in range(10)] 
      won = False
      turn = -1
      while not won: 
          if turn == -1: 
              # human turn   
              humanSpot = int(input("Enter your spot: "))
              if board[humanSpot] == '-': 
                  board[humanSpot] = 'X' 
              else: 
                  print("the spot is already filled!") 
                  continue
              turn *= -1
         
          if checkWin(board,'X'): 
              drawBoard(board) 
              print("You won!") 
              won = True
              break
            
          if turn == 1: 
              # computer turn  
              computerSpot = getComputerSpot(board,'O') 
              if computerSpot == None: 
                  drawBoard(board) 
                  print("The game is drawn!")
                  break
              else: 
                  board[computerSpot] = 'O' 
              turn *= -1
                
          drawBoard(board)