Encourage students to get the for-loop counter right before adding code inside the for loop this will reduce the amount of time spent troubleshooting for-loops and ensure students are scaffolded well.
Show students to separate the for-loop header from the for-loop content when discussing how many times a for-loop loops because students can get overwhelmed, but need to be able to separate the conditional from the loop’s content.
Misconceptions: Students have difficulty with loops partially because the motivation for looping a small number of times seems insufficient.
Motivate for-loops by having students informally describe how to draw a set of 5 shapes, then having them turn this description into pseudocode to practice for-loops.
Having students trace a simple program for drawing a set of squares in Processing to introduce loops and strengthen student understanding for-loops with a body of code through practice.
Show a variety of for loops conditionals (e.g., < vs. <=; different variable names, different start values, different increment operations) to avoid common misconceptions about loops.