Computer Science
Grade 1
20 min
Stack the Blocks: Repeating a Pattern
Repeating a block-stacking pattern.
Tutorial Preview
1
Introduction & Learning Objectives
Learning Objectives
Identify a simple repeating pattern in a sequence of objects.
Describe the core part of a pattern that repeats.
Count how many times a pattern repeats.
Create a simple 'loop' instruction to describe a repeating pattern.
Follow a loop instruction to build a pattern correctly.
Fix a mistake in a simple pattern sequence.
Have you ever built a super tall tower with blocks? π§± Let's learn how to tell a computer to do it!
We will learn about patterns. We will find parts that repeat. This helps us give short instructions to a computer. π»
Real-World Applications
Singing the chorus of a song again and again πΆ
Clapping a rhythm in music class π
Brushing your teeth: up, down, up, down... π¦·
Setting the table: plate, fork, spoon for each...
2
Key Concepts & Vocabulary
TermDefinitionExample
PatternA pattern is something that happens over and over again. ΠΏΠΎΠ²ΡΠΎΡΠ΅Π½ΠΈΠ΅A red block, then a yellow block. Red, yellow, red, yellow... β€οΈπβ€οΈπ
RepeatTo do the exact same thing again. πYou can repeat the action of clapping your hands. π π π
LoopA loop is an instruction to repeat something. It's a computer's way to do things again and again.A loop instruction could be: 'Repeat 3 times: Clap your hands.' π π π
InstructionAn instruction is a step to follow. It tells you what to do. πAn instruction is 'Put a blue block on top.'
SequenceA sequence is a list of things in a special order. β‘οΈA sequence of blocks: Blue, Green, Green, Blue, Green, Green. ππππππ
3
Core Syntax & Patterns
Find the Pattern Core
Look for the smallest part that repeats.
To make a loop, first find the group of blocks that is the same each time. This is your main instruction.
Count the Repeats
Count how many times you see the pattern core.
After you find the pattern core, count how many times it shows up. This number tells the loop how many times to repeat.
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 tower is built with a repeating color pattern: Red, Green, Blue, Red, Green, Blue... If you repeat this pattern and build a tower with 5 blocks, what color is the 5th block (the top block)?
A.π΄ Red
B.π’ Green
C.π΅ Blue
D.π¨ Yellow
Challenging
Robot 1 follows Code 1: 'Repeat 2 times: [Stack π΄, Stack π΅]'. Robot 2 follows Code 2: 'Repeat 3 times: [Stack π‘]'. Which tower is taller?
A.Robot 1's tower
B.Robot 2's tower
C.They are the same height
D.We can't tell
Challenging
You build a tower by following two sets of instructions. Step 1: Do the pattern 'Stack 1οΈβ£, Stack 2οΈβ£' one time. Step 2: Do the pattern 'Stack π
°οΈ, Stack π
±οΈ' two times. How many blocks are in the final tower?
A.4
B.5
C.6
D.7
Want to practice and check your answers?
Sign up to access all questions with instant feedback, explanations, and progress tracking.
Start Practicing Free