6/19


#1

def print_board(board):
[tab]for row in board:
[tab][tab]for O in row:
[tab][tab]new_row = " ".join(O)
[tab]print new_row
why does this code not work? only prints
O
O
O
O
O


#2

nevermind got it i just hadn't looked at the hint


#3

board=[]
for i in range(5):
circles=5*["O"]
board.append(circles)
def print_board(board):
for row in board:
print " ".join(row)
print print_board(board)


#4

Try this:

board = []

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


def print_board(board):
    for j in range (0, len(board)):
        print " ".join(board[j])

print_board(board)