9.1.7 Checkerboard V2 Answers ((install)) Info
: Ensure your loops run exactly range(8) to match the 8x8 requirement.
The logic (row + col) % 2 != 0 is the standard mathematical way to create a checkerboard. : Sum is 0 (Even) → stays 0 . Row 0, Col 1 : Sum is 1 (Odd) → becomes 1 . Row 1, Col 0 : Sum is 1 (Odd) → becomes 1 . Row 1, Col 1 : Sum is 2 (Even) → stays 0 . 9.1.7 checkerboard v2 answers
The exercise is a common challenge in introductory Python courses, specifically on platforms like CodeHS . While version 1 typically asks you to fill specific rows with 1s, version 2 requires a true alternating checkerboard pattern across the entire 8x8 grid. The Objective : Ensure your loops run exactly range(8) to
: In Python, improper indentation of your nested loops will cause a SyntaxError or logic failure. Ensure your if statement is inside the second loop. Row 0, Col 1 : Sum is 1 (Odd) → becomes 1
: Many students try to print the pattern using a string like "0 1 0 1" . However, the CodeHS autograder often checks if you actually modified the list values.
