print('that column is fullselect another one ' continue ask player again for their move starting from the bottomfind the first empty space for rowindex in range(board_height - - ) if board[(columnindexrowindex)=empty_space return (columnindexrowindex def isfull(board) """returns true if the `boardhas no empty spacesotherwise returns false "" for rowindex in range(board_height) for columnindex in range(board_width) if board[(columnindexrowindex)=empty_space return false found an empty spaceso return false return true all spaces are full def iswinner(playertileboard) """returns true if `playertilehas four tiles in row on `board` otherwise returns false "" go through the entire boardchecking for four-in- -row for columnindex in range(board_width ) for rowindex in range(board_height) check for horizontal four-in- -row going right tile board[(columnindexrowindex) tile board[(columnindex rowindex) tile board[(columnindex rowindex) tile board[(columnindex rowindex) if tile =tile =tile =tile =playertile return true for columnindex in range(board_width) for rowindex in range(board_height ) check for vertical four-in- -row going down tile board[(columnindexrowindex) tile board[(columnindexrowindex ) tile board[(columnindexrowindex ) tile board[(columnindexrowindex ) if tile =tile =tile =tile =playertile return true for columnindex in range(board_width ) for rowindex in range(board_height ) check for four-in- -row going right-down diagonal tile board[(columnindexrowindex) tile board[(columnindex rowindex ) tile board[(columnindex rowindex ) tile board[(columnindex rowindex ) if tile =tile =tile =tile =playertile return true check for four-in- -row going left-down diagonalfour in row