Not sure how to work the code


#1

makes a very wonky output and spits back the error message "does not have five rows"


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


#2

Start by defining board as an empty list.

board = []

Now you loop will append the correct number of rows. Move the print statement outside of the loop.


#3

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