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