Nver Mind omg


#1



https://www.codecademy.com/courses/python-beginner-en-4XuFm/0/7?curriculum_id=4f89dab3d788890003000096#


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)
random_row(board)
rondom_col(board)


#2

Hello

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.


#3

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