Computer Science
Grade 1
20 min
Jump, Jump, Jump!
Repeating a jumping action a specified number of times.
Tutorial Preview
1
Introduction & Learning Objectives
Learning Objectives
Identify a repeating action in a set of instructions.
Define the word 'loop' as a way to repeat something.
Follow a simple loop instruction, like 'Clap 3 times'.
Count the number of times an action is repeated in a loop.
Create a simple algorithm with a loop for a friend to follow.
Explain why loops are useful for computers.
Have you ever sung a song and repeated the fun part over and over? πΆ That's a loop!
Today, we will learn about loops! A loop is a special computer instruction. It tells the computer to do something again and again.
Real-World Applications
Singing the chorus of 'Wheels on the Bus' π
A bouncing ball going up and down π
Clapping your hands after a show π
Brushing your teeth in circles π¦·...
2
Key Concepts & Vocabulary
TermDefinitionExample
InstructionAn instruction is one single step to do. It's like a command. β‘οΈA single instruction is 'Take one step forward'.
SequenceA sequence is a list of instructions in the correct order. π’First, stand up. Second, stretch your arms. That is a sequence.
LoopA loop is a special instruction to repeat an action. πInstead of saying 'Jump, Jump, Jump', we can say 'Loop Jump 3 times'.
RepeatTo repeat means to do the same thing more than once. π°π°If you repeat clapping, you clap and then you clap again.
CountCount is how many times we do something. 1οΈβ£, 2οΈβ£, 3οΈβ£!In 'Stomp 4 times', the count is four.
3
Core Syntax & Patterns
The 'Repeat [Number] Times' Pattern
Repeat [Action] [Number] times.
Use this when you know exactly how many times to do something. Tell the computer the action and the number.
The 'Repeat Until' Pattern
Repeat [Action] until [Something happens].
Use this when you don't know the number. You just keep going until a signal tells you to stop.
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
A robot builds a tower with this pattern: π₯π¦π©π₯π¦π©... If the tower needs to be 8 blocks tall, what color is the 8th block?
A.π₯ (Red)
B.π© (Green)
C.π¨ (Yellow)
D.π¦ (Blue)
Challenging
A friend writes this code for a robot: `REPEAT 1 TIME [ WAVE π ]`. Is this a good way to use a loop?
A.No, because it only happens once, so a loop isn't needed
B.Yes, it's the only way to make it wave
C.Yes, all code needs loops
D.No, because robots cannot wave
Challenging
You are a robot! Your program is: `REPEAT UNTIL you touch a π³ [ HOP ]`. If the tree is 4 hops away, how many times will you hop?
A.3 times
B.4 times
C.5 times
D.1 time
Want to practice and check your answers?
Sign up to access all questions with instant feedback, explanations, and progress tracking.
Start Practicing Free