5/13 what is wrong?


#1

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

def print_board(board):
for x in print_board:
return print_board

Oops, try again. Your print_board function should take exactly one parameter.

What is wrong???


#2

you make a board here:

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

(no need to use double ((, board.append(["O"] * 5) is fine too)

Anyway, then you want to draw the board you made, so you define a a function to print the board:

def print_board(board):

and pass board as an argument to the function, since your board is a multi dimensional array, you want to loop over the array:

for x in print_board:

Oops, there things go wrong. print_board is the function, you want to loop over the array you pass as argument:

for x in board:

and you want to print the x: (the rows of your array)

print x

i don't understand, why you would return the entire function.


#3

you should print and called your function
in the end of the line of your code .
just like it > print_board(board)

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

def print_board(board):
for i in board:
print i

print_board(board)


#4

Thanks, Don't forget to indent!