Soultion to the problem. thanks


#1

board = []

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

print (print_board(board))


#2

the function itself can already print something... So you don't have to print it again.. you just have to call the function like that: print_board(board)

Why are you making this test?


#3

I test the code in Python IDE, the code work perfect, you know the Codecademy they have the way to check your code in console environment. Thank you. I hope you understand.


#4

yeah.. but i was saying:

board = []

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

print_board(board)

#5

What are you saying about Mr. Konaesan?


#6

this test is not necessary because the function is just supposed to print out everything in bord..

it must be print_board(board) not print(print_board(board))

you must have something like this:

board = []

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

print_board(board)

#7

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