7/18 Hide


#1

Why is this code not working???

I double-checked it already.

Here's the 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!

from random import randint

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

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

return ship_row
return ship_col


#2

Did you read the post about how to post code samples? Don't treat others like servants.Due diligence is always a precursor that everyone enjoys. Read the Help > Q&A Forums article on this.