Help with for(SOLVED)

thank you TfGuy44 for helping me out!!
(SOLVED)

Hey! Thanks for the help! I have a question though, what’s the TWO_PI for? i’ve never seen that function before

TWO_PI is a constant, equal to 2 times PI. About 6.28…

In radians, TWO_PI is one full rotation of 360 degrees.

But I don’t want to rotate the squares all the way around - I only want to rotate them a little bit. 1/20 of a full rotation is right because there are 20 squares.

One last question, how’d you make the rectangles to alternate between black and white in order?

I’m setting the stroke color before I draw each rectangle. Since I am using the variable i in a loop, the first rectangle is “number 0”, the next one is “number 1” and so on.

i%2 is 0 if i is even, and 1 if i is odd.

255 * (i%2) is 255 times either 0 or 1. So odd numbered rectangles have a stroke of 255 (white) while even numbered rectangles have a stoke of 0 (black).

Thank you so much! You’ve saved me a headache!