Chapter 7. Repetition: A Deeper Exploration of Loops

You’ve seen some of Scratch’s repetition structures before, but this chapter covers them in greater detail. It’s time to discuss new blocks that create loops, nested loops, and recursion. By the end of this chapter, we’ll have explored the following programming concepts:

  • Repetition structures to execute statements repeatedly

  • How to validate user input

  • Counter-controlled and event-controlled loops

  • Procedures that can call themselves with recursion

Although most people find repetitive tasks boring, computers seem to like nothing more. Repetition structures, better known as loops, are programming commands that tell a computer to repeatedly execute a statement or a sequence of statements. The simplest ...

Get Learn to Program with Scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.