Random Tip

Show students multiple examples of iteration in Scratch to help them understand and recognize more abstract programming patterns.

Share Show students multiple examples of iteration in Scratch to help them understand and recognize more abstract programming patterns. with FacebookShare Show students multiple examples of iteration in Scratch to help them understand and recognize more abstract programming patterns. with Twitter
  • Helping students identify and understand similarities between pieces of code that use iteration will improve their understanding of iteration, loops, and variables.
  • Applying and customizing programming patterns, like iteration, is a powerful tool for programmers.
  • All of the scripts below have the same overarching structure, iteration.
  • Top left: set pen size to (5), repeat (10): pen down, pen up, move (30) steps, change pen size by (5). Top right: set (my number) to (10), repeat (11): say (my number) for (0.5) secs, change (my number) by (-1). Bottom left: set tempo to (60) bpm, repeat (10): play drum (1) for (1) beats, change tempo by (20). Bottom right: set (my note) to (60), repeat (10): play note (my note) for (0.5) beats, change (my note) by 1