Code below - totally bemused by this - "make sure not to delete or modify the board" error message


#1

rom random import randint

board = []

for x in range(0, 5):
board.append(["O"] * 5)

def print_board(board):
for row in board:
print " ".join(row)

Add your code below!

def random_row(board):
return randint(0, len(board) - 1)

def random_col(board):
return randint(0, len(board) - 1

random_row(board)
random_col(board)


#2

Are you maybe supposed to store these values in variables?


#3

Posting code that can be copied to produce the same thing as you describe greatly increases the amount of information that is available to those looking to give your problem a couple of brain-cycles. (Try copying the code from your post and running it without first modifying it)


#4

def random_row(board):
return randint(0, len(board) - 1)

def random_col(board):
return randint(0, len(board) - 1

row = random_row(board)
col = random_col(board)
print_board(board)