Dash & Dot: Introduction to Variables in Programming (Gr. 4-5)


Being able to recognize and analyze patterns is an important skill when learning to program. In this lesson, students will learn how variables can be used to program patterns.


  • Recognize that a pattern follows a rule.
  • Identify apparent features of the pattern that are not explicit in the rule itself.
  • Understand that a variable is a value that can change.
  • Identify the rule for a pattern.

Educational Standards


  • Grade 4 - Mathematics, Patterning & Algebra

British Columbia

  • Grade 5 - Mathematics, Patterns, Variables, ADST


  • Grade 5 - Mathematics, Patterns and Relations, Variables, ICT, Foundational Operations, Knowledge and Concepts

Lesson Procedure

  • Class 1: Patterns and Variables (30 - 40 minutes)
  • Class 2: A Personal Understanding of Variables (20 minutes)
  • Class 3: Programming Challenge (30 - 40 minutes)


Robots and Accessories

Other Supplies

  • Tablets - (See Compatible Devices)
  • Introduction to Variables Presentation
  • Pattern recording sheet
  • Projector or print-outs of Blockly code from Part A
  • Projector or print-outs of Blockly code from Part B
  • 2 Boxes per group
  • Objects to be used as counters like marbles, paper clips, or pieces of paper

Find Out More