Codehs — 9.1.7 Checkerboard V2

The exercise on CodeHS involves creating an

for (var row = 0; row < NUM_ROWS; row++) for (var col = 0; col < NUM_COLS; col++) // Logic for coloring goes here Use code with caution. Copied to clipboard 3. Apply the parity logic 9.1.7 Checkerboard V2 Codehs

Usually, "Checkerboard V2" asks you to print a grid of alternating characters (like ' ' and '*' ) to form a checkerboard pattern. The exercise on CodeHS involves creating an for

Call the provided print_board function to display your final 2D list. Solution Code javascript Using setFilled(true) alone might leave a tiny

You will need one loop for the and another inside it for the columns . javascript

Using setFilled(true) alone might leave a tiny border. Some CodeHS exercises expect setFilled(true) without setColor for the outline. If gaps appear, set the outline color to match the fill color:

Since I don't have access to your specific instance of the problem (which usually involves a specific width, height, or starting color), I will provide the used to solve this problem in Python. This logic works for any version of the problem.