board [for in range(boardwidth)column [for in range(boardheight)column append(countercounter +boardwidth board append(columncounter -boardwidth (boardheight boardwidth board[boardwidth- ][boardheight- none return board the getstartingboard(data structure will create and return data structure that represents --solved|boardwhere all the numbered tiles are in order and the blank tile is in the lower right corner this is done with nested for loopsjust like the board data structure in the memory puzzle game was made howevernotice that the first column isn' going to be [ but instead [ this is because the numbers on the tiles increase by going across the rownot down the column going down the columnthe numbers increase by the size of the board' width (which is stored in the boardwidth constantwe will use the counter variable to keep track of the number that should go on the next tile when the numbering of the tiles in the column is finishedthen we need to set counter to the number at the start of the next column not tracking the blank position def getblankposition(board) return the and of board coordinates of the blank space for in range(boardwidth)) for in range(boardheight) if board[ ][ =none return (xywhenever our code needs to find the xy coordinates of the blank spaceinstead of keeping track of where the blank space is after each slidewe can just create function that goes through the entire board and finds the blank space coordinates the none value is used in the board data structure to represent the blank space the code in getblankposition(simply uses nested for loops to find which space on the board is the blank space making move by updating the board data structure def makemove(boardmove) this function does not check if the move is valid email questions to the authoral@inventwithpython com