Computer Science
Grade 1
20 min
Clap, Clap, Repeat!
Repeating a clapping pattern several times.
Tutorial Preview
1
Introduction & Learning Objectives
Learning Objectives
Identify a repeating pattern in a set of instructions.
Define a 'loop' as a way to repeat actions.
Use a 'repeat' block to make an action happen multiple times.
Count how many times an action should be repeated.
Create a simple sequence of instructions that includes a loop.
Explain why loops are useful for computers.
Have you ever sung a song where you repeat the same part? πΆ Like 'Row, row, row your boat'?
Today, we will learn how to tell a computer to do something over and over again. This is called a loop! It helps us give instructions much faster. π¨
Real-World Applications
A blinking light on a toy π‘
The chorus of your favorite song π€
Waving goodbye many times π
Stomping your feet to a beat π₯
2
Key Concepts & Vocabulary
TermDefinitionExample
Action Step πA single instruction or thing to do.An Action Step could be 'jump once' or 'draw one star β'.
Sequence β‘οΈA list of Action Steps in the correct order.First, pick up a crayon ποΈ. Second, draw a circle π΅.
Loop πA special instruction that tells the computer to repeat Action Steps.Instead of saying 'clap, clap, clap,' we can say 'repeat clap 3 times'.
Repeat Block πͺA block that holds the actions you want to do again and again.We put the 'stomp foot' Action Step inside a Repeat Block.
Count π’The number that tells the loop how many times to repeat.If the Count is 4, the loop will do the action four times.
3
Core Syntax & Patterns
The Repeat Rule
Repeat [Count] Times { Action Step }
Use this to do the same action more than once. Put the action inside the Repeat Block and set the count.
The Order Rule
Actions happen one after another.
A computer follows your steps in order, even inside a loop. It finishes the loop before moving on.
4 more steps in this tutorial
Sign up free to access the complete tutorial with worked examples and practice.
Sign Up Free to ContinueSample Practice Questions
Challenging
You want to make a bracelet with this pattern: β€οΈπππβ€οΈπππ. What is the SMALLEST group of beads you can tell a robot to "repeat"?
A.β€οΈπππ
B.β€οΈππ
C.β€οΈπ
D.β€οΈπππβ€οΈ
Challenging
A robot is told: "Take 1 step forward, then spin." It repeats this 4 times. If it starts on the first mat, how many spins will it have done when it is standing on the FOURTH mat?
A.1 spin
B.2 spins
C.3 spins
D.4 spins
Challenging
Robot 1 is told: "Do 5 jumping jacks." Robot 2 is told: "Do a jumping jack. Repeat 5 times." Which robot does more jumping jacks?
A.Robot 1
B.Robot 2
C.They do the same number
D.We don't know
Want to practice and check your answers?
Sign up to access all questions with instant feedback, explanations, and progress tracking.
Start Practicing Free