O'Reilly logo

Learn to Program with Scratch by Majed Marji

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required