๐ŸŽฏ Grade 5 ยท 3. Algebra

Pattern coding โ€“ Grade 5 Math Lesson

  1. 1. ๐Ÿ“– Lesson
  2. 2. ๐Ÿง  Practice
Free lessons used: 1 of 5 ๐Ÿ”“ Unlock everything

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

  1. 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!

  2. 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!

  3. 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!

  4. 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!

  5. 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!

Practise all 70 Pattern coding questions โ†’

More Grade 5 Lessons: 3. Algebra

All Grade 5 lessons โ†’