Get the error message "Oops, try again. Did you create a function called random_row?"

Have I not defined the random_row properly?


from 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 randit(0, len(board[0]) - 1)

def random_col(board):
    return randit(0, len(board[0]) - 1)


Hi there!
So, you've got this:

import randint

and, you got:

return randit(0, len(board[0]) - 1)

Do you see where you made a silly mistake?


Ahh oops! Thanks for your help!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.