Choose exam board for KS4 Computer Science (GCSE)
Choose exam board for KS4 English
Choose exam board for KS4 French
Choose exam board for KS4 Geography
Choose exam board for KS4 German
Choose exam board for KS4 History
Choose tier for KS4 Maths
Choose exam board for KS4 Music
Choose exam board for KS4 Physical education (GCSE)
Choose exam board for KS4 Religious education (GCSE)
Choose exam board for KS4 Spanish

      Changing values in a program

      Lesson details

      Learning outcome

      I can change the value in a command block and explain its effect.

      Key learning points

      1. Some command blocks can have number values on them.
      2. Values can be changed, causing different effects.
      3. Programs can be made shorter by deleting blocks and changing values.

      Keywords

      • Delete - to remove something on a screen

      • Value - a number that can be changed

      • Effect - the result of changing something

      Common misconception

      The value is always how many times the command should run.

      Different values cause different effects depending on the underlying command. These might not always be numerical values either.

      Teacher tip

      Use mini whiteboards or another similar tool to check that pupils understand the effect that the order of operations has on a program. Pupils can trace out the movement of a sprite before actually coding to visualise what the correct output should look like.

      Equipment

      Pupils will need access to a device with block-based programming software. Examples in this lesson use ScratchJr https://oak.link/scratch-jr

      Licence

      This content is © Oak National Academy Limited (2026), licensed on Open Government Licence version 3.0
      except where otherwise stated. See Oak's terms & conditions
      (Collection 2).

      Lesson video

      Loading...

      Prior knowledge starter quiz

      4 Questions

      Q1.
      In ScratchJr, what is the still picture on the stage called?

      Correct answer: background
      behind
      backstreet

      Q2.
      What is the green flag used for?

      to choose a colour
      Correct answer: to start a program
      to change the sprite

      Q3.
      What is an algorithm?

      a blocks palette
      Correct answer: a set of instructions for a program
      a sprite

      Q4.
      What does a program need to have at the end?

      a sprite
      an algorithm
      Correct answer: an end block

      4 Questions

      Q1.
      What is a value?

      Correct answer: a number on a command block
      a number on a sprite
      a sprite

      Q2.
      Where do you drag blocks to delete them?

      into the stage
      Correct answer: into the blocks palette
      into the programming area

      Q3.
      What happens when you change a value on a movement block?

      Correct answer: It changes what a sprite does.
      It changes a sprite's colour.
      It changes the background.

      Q4.
      What is one way to make a program shorter?

      use fewer backgrounds
      Correct answer: delete blocks that are not needed
      take out the sprite

      To help you plan your 1 computing lesson on: Changing values in a program, download all teaching resources for free and adapt to suit your pupils' needs...