In , the goal is to create a pattern of alternating 1s and 0s in a 2D list (grid). Unlike version 1, which often uses simple row filling, version 2 requires you to use nested for loops and the modulus operator ( ) to check for even and odd positions. Logic for the Pattern
| Mistake | Why It’s Wrong | |---------|----------------| | Using (row + col) % 2 | V2 usually asks you to avoid this and use explicit toggling | | Forgetting to toggle after each square | Results in solid columns | | Not handling even column count | Causes row starting colors to be same for all rows | | Using setFilled(false) | Unfilled squares may appear invisible or white — set fill and color explicitly | 9.1.7 Checkerboard V2 Codehs
begin_fill() and end_fill(): These are required to actually color the inside of the square. Without them, the turtle would only draw the outline.