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) def random_row(board): from random import randint row = randint(0,4) def random_col(board): from random import randint col = randint(0,4) random_col(board) random_row(board)
from the instructions:
These functions should
return a random row index
if you need to return something, use a return keyword
importing randint once at the beginning of your program is enough?
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.