board = [ ] for x in range(5): board.append(["O"]*5) def print_board(board): for row in board: print " ".join(row) print "Let's play Battleship!" print_board(board)
This is my code for Battleship problem, the error is " it looks like you function did not print the correct response!"
For which Battleship! exercise did you submit this code?
Your code works correctly for Printing Pretty.
For the previous exercise, which is Custom Print, you need this ...
instead of this ...
print " ".join(row)
It worked, thanks a lot.
No problem; enjoy the exercises