About

Mary Corbet

writer and founder

 

I learned to embroider when I was a kid, when everyone was really into cross stitch (remember the '80s?). Eventually, I migrated to surface embroidery, teaching myself with whatever I could get my hands on...read more

Contact Mary

Connect with Mary

     

Archives

2026 (46) 2025 (126) 2024 (135) 2023 (125) 2022 (136) 2021 (130) 2020 (132) 2019 (147) 2018 (146) 2017 (169) 2016 (147) 2015 (246) 2014 (294) 2013 (294) 2012 (305) 2011 (306) 2010 (316) 2009 (367) 2008 (352) 2007 (225) 2006 (139)

916 Checkerboard V1 Codehs Fixed ((free)) -

if ((row + col) % 2 == 0)

The expression (row + col) % 2 :

: We start by creating a list called grid . By looping 8 times and appending a list of eight 0 s each time, we build a 2D structure (8x8). 916 checkerboard v1 codehs fixed

Create a 2D list containing eight sub-lists, each with eight zeros. grid = [] for i in range( 8 ): grid.append([ 0 ] * 8 ) Use code with caution. Copied to clipboard Iterate through every row ( ) and column ( if ((row + col) % 2 == 0)

# Determine Color # If (row + col) is even, draw black. If odd, draw red. if (i + j) % 2 == 0: t.color("black") else: t.color("red") draw black. If odd