Battleship! Idk what I'm doing wrong


#1

board = []
for x in range(0,5):
(tab)board.append(["O"] * 5)
def print_board(board):
(tab)for row in print_board:
(tab)(tab)print row


#2

It should look something like this.

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

#3

after studying and implementation of your code it's telling me that my code didnt print out the correct response.


#4

Are you sure? What did you put in there? If I copy and paste this to section 6 of the battleship(printing pretty) it works fine.

With the print line too of course.

print_board(board)

Post your code in here and make sure to codify it please. This button </>


#5

thanks i had to tab the print statement a few times