Cover the outer-loop of nested loops when tracing through loops to help students see the inner loop runs just like a single loop during execution to help students understand nested loops.

  • Students struggle to see that the outer-loop doesn’t impact the inner-loop during the execution of nested loops.
    • Covering the outer-loop helps students see it’s irrelevant to the execution of the inner-loop.
  • Reiterating this fact can help students construct their loops correctly.

More about this tip

External Source

Interview with Charlie McDowell.