Stuck


#1



board=[]


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


def print_board(board):
    for row in board:
        print"".join(row)

print print_board(board)



Your function should contain a for loop that iterates over each row in the board. For each row, it should print " ".join(row).

I GET->
Oops, try again. It looks like you function didn't print out the correct response!


#2

here:

print"".join(row)

you need a space between the two quotation marks, so there is a space between the O's of your columns.

join uses the character between the quotation mark to join the different list elements together


#3

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