Printing Pretty


#1



Battleship #6 Printing Pretty


I receive an error message -
Oops, try again. It looks like you function didn't print out the correct response!


board = []

for i in range (5):
    row = (["O"] * 5)
    print " ".join(row)
    
def print_board(board):
    for i in range (len(board)):
        print board[i]
        
print_board(board)


#2

This line should read,

board.append(row)

This line would be where to use the above:

print " ".join(row)

#3

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