7/19 - raindint is not defined


typing in this code:

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_in):
return randint(0, len(board_in) - 1)

def random_col(board_in):
return raindint(0, len(board_in) - 1)


and then it gives me this error:
Traceback (most recent call last):
File “python”, line 21, in
File “python”, line 18, in random_col
NameError: global name ‘raindint’ is not defined


check your spelling/check for typos


oh right, shouldn’t do coding at night


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