Nver Mind omg



Traceback (most recent call last):
File "python", line 14, in
File "python", line 11, in random_row
NameError: global name 'radint' is not defined

I get this error along with another that asks whether I created function random_row. Please Help

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 radint(0, len(board) - 1)
def random_col(board):
    return radint(0, len(board) - 1)



radint(0,4) & len(board) - 1 are two functions which need to be called.
You did call on radint(0,4) but not on len(board) - 1.
Also the Hint that the lesson provides will help. (If you wonder where I got radint(0,4))

Hope that helps.


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