Introduction to variables

Key Stage: Key Stage 2 Coding Language: Scratch  Resource type: Lesson plan and teacher guide

Resource overview

In a program, data values can be constant or variable. If data values are variable they can be changed by the program and the user, for example, when the user is asked a question like their age. Variables may change during program execution.

  • Key resource information

    • You will need: Laptops or desktop computers, access to https://scratch.mit.edu           
    • Some experience with a block based programming language is helpful, but not essential.
  • Teaching assessment opportunities

    • Have the children try out each other’s code – did they all use the same blocks? 
    • What was different? 
    • What is the benefit of using variables in your programme, instead of keeping score on paper?
  • Lesson length

    • 45 minutes

     

  • Pupil objectives

    • "I understand what a variable is and can use them in my programming with various outputs”
    • “I understand the operation of a process and its outcome. I can structure related items of information.”
    • “I can compare, describe and show number relationships, using appropriate vocabulary and the symbols for equals, not equal to, less than and greater than.”

Related resources

Introduction to Scratch

The purpose of this activity is to introduce Scratch for the first time to your class and to introduce some key computing vocabulary.

Introduction to conditionals

Conditional statements are all around us in everyday life and in computing. Use everyday examples to bring conditionals to life and get the class moving with an offline activity before creating a Rock, Paper, Scissors game using Scratch.

Introduction to loops

Creating clear and simple code makes fixing, or debugging, your code much easier and using loops to simplify your instructions is a great way to start writing efficient code. In this lesson get the class moving as they learn about loops through dance before moving on to create a drawing project using loops in Scratch.

Any questions?

Code Playground is all about offering the support you need. If you have a question, comment or suggestion, please don’t hesitate to get in touch. We’d love to hear from you.