"""returns dictionary that represents four in row board the keys are (columnindexrowindextuples of two integersand the values are one of the ' ''oor (empty spacestrings "" board { for columnindex in range(board_width) for rowindex in range(board_height) board[(columnindexrowindex)empty_space return board def displayboard(board) """display the board and its tiles on the screen "" '''prepare list to pass to the format(string method for the board template the list holds all of the board' tiles (and empty spacesgoing left to righttop to bottom:'' tilechars [ for rowindex in range(board_height) for columnindex in range(board_width) tilechars append(board[(columnindexrowindex)] display the board print("" + |{}{}{}{}{}{}{} |{}{}{}{}{}{}{} |{}{}{}{}{}{}{} |{}{}{}{}{}{}{} |{}{}{}{}{}{}{} |{}{}{}{}{}{}{} ++""format(*tilechars) def askforplayermove(playertileboard) """let player select column on the board to drop tile into returns tuple of the (columnrowthat the tile falls into "" while truekeep asking player until they enter valid move print('player {}enter column or quit:format(playertile) response input(''upper(strip( if response ='quit' print('thanks for playing!' sys exit( if response not in column_labels print('enter number from to {format(board_width) continue ask player again for their move columnindex int(response - for -based the index if the column is fullask for move again if board[(columnindex )!empty_space project #