9.1.7 Checkerboard V2 Answers May 2026
CodeHS 9.1.7 Checkerboard v2 exercise, the goal is to create a function that generates a 2D list (a list of lists) representing an 8x8 checkerboard pattern using 0s and 1s. Solution Code # Create an empty list for the current row current_row
board.add(currentRow);
# Place checkers for row in range(3): for col in range(8): if (row + col) % 2 != 0: board[row][col] = Checker('black') 9.1.7 checkerboard v2 answers
To draw:
Loop again, using x = col * 50 , y = row * 50 , create GRect , set fill color from board[row][col] , and add(square) . CodeHS 9