Tip:
Highlight text to annotate it
X
Every athlete knows that you get good by practicing,
by repeating the same moves until you get really good, or until you reach your goal.
When I was in high school,
I wouldn't leave practice until I made 10 free throws in a row.
Similarly, when you get to a computer program and repeat a command
you can give it an exact number of times to repeat,
or you can define a goal,
and tell it to repeat the command until it reaches some goal.
In the next example, the "repeat" block is changed,
instead of specifying how many times you want it to repeat
you can use the "repeat until" block to tell the angry bird to do the same thing
until it gets the pig or until it crashes into a wall.
And again, we can put multiple blocks inside the loop and repeat a series of actions.