Battleships (3/19)


Can somebody help me with the loop im not sure how to do the loop it is asking me to do



Hi, Use 'for-loop'

for x in range(5):
board.append(["O"] * 5)


@alexcollinskem, here is the required code. I suggest you go back and review earlier exercises/tasks to consolidate.

for i in range(0,5): #This is the loop
        list = ["O"] * 5 #This is the code for a row of the board
print board

Hope this helps,



Thanks for your help this has helped me understand the concept of a loop clearer


Thanks for your help


this worked for me.

board = []
for i in range(5):
board.append(["O"] * 5)