write my assignment 3592

Create an empty boardChoose a random column, and ‘drop’ a token (‘X’ or ‘O’)if the column is full, choose another random column random randheight = width = :board = [[]] * widthplays = rand.randint(,int(*height*width))player = i range(plays):valid_col = valid_col:col_choice = rand.randrange(, width)col = board[col_choice] len(board[col_choice]) < height:valid_col = col = col + [player]swap_players(player) c board: len(c) < height:c = c + [] board : player == :player = :player = :print(height, width) i range(, -height, ): j range(width):print(board[j][i], end=)print()examples = print(examples) i range(examples):height = rand.randint(,)width = rand.randint(,)bd = random_filled(height, width)display_board(bd)print()
 
"Not answered?"
Get the Answer