Hide


#1



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




This seems like this should be correct I don't know what is wrong so any help would be appreciated.


Replace this line with your code.


#2

Check your indentation on lines 13 and 16. Hit the enter button on your keyboard after the colon of that function.

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

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

#3

still have the error tried everything still the same error.


#4

Ooo... you should be calling the functions just immediately after you created them and please watch out for the indentation. See below:

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

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

I hope this helps! :slight_smile:


#5

still didnt work. wished that was it.


#6

It looks like you're missing the second parentheses after -1

It should look like this:
return randint(0,len(board) - 1)


#7

Put the space in, still no go.


#8

In your screen shot there isn't a ")" after the -1


#9

forgot the end brackets......thanks


#10

2 posts were split to a new topic: Hide


#12

3 posts were split to a new topic: Hide


#15