๐ฏ Grade 5 ยท 3. Algebra
Pattern coding โ Grade 5 Math Lesson
- 1. ๐ Lesson
- 2. ๐ง Practice
About This Grade 5 Lesson
- Topic
- Pattern coding โ 3. Algebra unit
- Grade & ages
- Grade 5 ยท ages 10โ11
- Curriculum
- Ontario Mathematics Curriculum, Grades 1โ8 (2020)
- In this lesson
- Kashef ยท โ๏ธ Simple Pattern Code Examples ยท ๐ฏ Write Pattern Code!
- Created by
- The InukMath team
- Last updated
- October 19, 2026 ยท How we make our lessons
Pattern coding โ Grade 5 Lesson Notes
A quick written summary of this Grade 5 math lesson from the 3. Algebra unit. Read it with your child, then open the interactive lesson above and try the practice questions.
Kashef
Your super kind Grade 5 math teacher โค๏ธ
Write Code for Patterns
Grade 5 Ontario Math ๐ โข Algebra & Computational Thinking
I'm Kashef and today we're learning Pattern Coding! This means writing simple step-by-step instructions (like computer code) to create repeating or growing patterns. It's a fun way to combine math patterns with coding thinking! Ready to be a Pattern Programmer? Letโs go! ๐
We use simple commands like REPEAT, ADD, or PRINT to make patterns automatically.
REPEAT 5 times: Print "โญ"
Output: โญโญโญโญโญ
โ๏ธ Simple Pattern Code Examples
Example 1: Growing Numbers
Start with 3 REPEAT 4 times: Add 2 Print number
5, 7, 9, 11
Example 2: Repeating Shapes
REPEAT 6 times: Draw ๐ต Draw ๐ด
๐ฏ Write Pattern Code!
1. Write code to print the pattern: 10, 15, 20, 25
Start with 10REPEAT 3 times: Add 5 Print number
2. Code to make this repeating pattern: โค๏ธ๐ 4 times
REPEAT 4 times: Print โค๏ธ Print ๐
Problem 1: You get 3 stickers every day. Write code to show how many stickers after 5 days.
Start with 0REPEAT 5 times: Add 3 Print totalFinal: 15 stickers
Question: What does this code do?Start with 2REPEAT 3 times: Add 4, Print
Kashef is super proud of you! You can now write simple code to create and continue patterns.
Pattern coding connects math, patterns, and computer thinking โ you're ready for real coding adventures!
Pattern coding โ Sample Practice Questions
The pattern 5, 8, 11, 14 can be coded as
- A) n + 3
- B) n + 4
- C) n ร 2
- D) n - 3
Show answer
Answer: A) n + 3 โ Wonderful! Start with n and add 3 each time. You're doing so well with pattern coding!
The pattern 10, 20, 30, 40 is coded as
- A) n ร 10
- B) n + 10
- C) n - 10
- D) 2n + 5
Show answer
Answer: A) n ร 10 โ Excellent! Multiply the term number by 10. Great job!
What code describes 20, 18, 16, 14?
- A) n - 2
- B) n + 2
- C) 2n
- D) n รท 2
Show answer
Answer: A) n - 2 โ Wonderful! Subtract 2 each time. Super!
The pattern 3, 6, 12, 24 uses which code?
- A) n ร 2
- B) n + 3
- C) n - 3
- D) n + 6
Show answer
Answer: A) n ร 2 โ Each number doubles. Champion!
Code for the pattern 100, 90, 80, 70?
- A) n - 10
- B) n + 10
- C) 10n
- D) n รท 10
Show answer
Answer: A) n - 10 โ Subtract 10 each time. Excellent!
More Grade 5 Lessons: 3. Algebra
All Grade 5 lessons โ-
G5 ยท #107
Repeating patterns
๐ง 70 questions ยท ๐ worksheet ยท ๐ฎ game
Open lesson -
G5 ยท #108
Growing patterns
๐ง 70 questions
Open lesson -
G5 ยท #109
Shrinking patterns
๐ง 70 questions
Open lesson -
G5 ยท #110
Numeric patterns
๐ง 70 questions
Open lesson -
G5 ยท #111
Pattern rules
๐ง 67 questions ยท ๐ worksheet
Open lesson -
G5 ยท #112
Predict missing terms
๐ง 70 questions
Open lesson
