Want to keep learning?

This content is taken from the Raspberry Pi Foundation & National Centre for Computing Education's online course, Teaching Programming in Primary Schools. Join the course to learn more.

What is Repetition?

Repetition is simply the act of performing an action (or actions) multiple times.

For instance, people often do repeated exercises at the gym. If you were instructing someone to do ten push-ups, you could say:

“do a press-up
do a press-up
do a press-up
do a press-up
do a press-up
do a press-up
do a press-up
do a press-up
do a press-up
do a press-up”

Push-Up Robot

But what if you wanted to instruct them to do 40 press-ups? Or 100? A better (more efficient) way would be to say:

“do 40 press-ups”

In this case, you’re simply(?!) asking them to repeat the task of performing a press-up 40 times.


In another example of repetition, you might regularly attend a meeting, or sit down to watch your favourite TV programme. This event might be repeated each week, month or term. If you were to add this event to a calendar, you’d be given options for describing the repetition.

Calendar Repetition

In the calendar above, you can to specify the frequency of the repetition (weekly, monthly, every 4 weeks, etc.) as well as how many times to repeat the event. You can repeat the event forever, a set number of times, or until a specified date in the future.


Let’s go back to our recipe analogy from last week. A recipe for baking a cake might call for you to beat a mixture until it is light and fluffy, or to leave the mixture in the oven until it is golden brown. Notice that the instructions don’t tell you how long these actions will take to complete, as there’s no precise way of knowing beforehand. Instead, you’re asked to repeat an action until a specified condition is met.


Repeating until a condition is met is also seen in a game of football, which is played until the referee blows the final whistle.

Calendar Repetition

Now that you’ve seen some examples of repetition in everyday life, let’s have a go at using repetition in Scratch.

Share this article:

This article is from the free online course:

Teaching Programming in Primary Schools

Raspberry Pi Foundation