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

      Lesson details

      Learning outcome

      I can use subroutines to execute sequences of commands.

      Key learning points

      1. Computers only follow the commands they are given, so these need to be precise and accurate.
      2. Commands can be joined together to create sequences in Scratch to achieve a desired outcome.
      3. Sequences can be separated into individual subroutines.
      4. Programs should be written so that other people can easily understand them. Subroutines are used to do this.

      Keywords

      • Execute - to run or carry out the commands in a program

      • Sequence - the order of commands in a program

      • Subroutine - a sequence of instructions with an identifiable name that performs a specific task

      Common misconception

      A sprite in Scratch can only have one sequence of code blocks.

      Sequences of code can be separated into subroutines and these subroutines can be called multiple times.

      Teacher tip

      'Acting out' instructions is helpful for pupils to understand the logic of any algorithm. Encourage pupils to imagine that they are the objects they need to control. By doing so, they can better appreciate what commands are needed to carry out required actions.

      Equipment

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

      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

      6 Questions

      Q1.
      A program is a set of that can be run by a computer.

      Correct Answer: commands, instructions

      Q2.
      A sequence is a precise set of instructions in a particular ...

      Correct answer: order.
      format.
      style.

      Q3.
      What type of code block is this?

      An image in a quiz
      Correct answer: event
      sound
      variable
      Control

      Q4.
      True or false? This sequence of commands will make the sprite move 100 steps, play the sound woof, then turn the sprite clockwise 90 degrees and play the sound woof again.

      An image in a quiz
      True
      Correct answer: False

      Q5.
      True of false? When the blocks are rearranged and joined together differently, the sequence changes.

      Correct answer: True
      False

      Q6.
      Which icon do you use to add a new sprite in Scratch?

      An image in a quiz
      Correct Answer: An image in a quiz
      An image in a quiz
      An image in a quiz
      Q3 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q4 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q6 image 1 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q6 image 2 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q6 image 3 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0

      4 Questions

      Q1.
      When instructions are carried out by a computer, this is known as __________.

      Correct answer: executing
      a sequence
      a command

      Q2.
      A __________ is a pattern or process where one thing follows another.

      Correct answer: sequence
      selection
      iteration

      Q3.
      A is a named section of code that can be called (used) in a program.

      Correct Answer: subroutine

      Q4.
      In this sequence of code, we have several blocks. What does frere_jacques represent?

      An image in a quiz
      Correct answer: a subroutine
      a variable
      a command
      Q4 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0

      To help you plan your 7 computing lesson on: Sequence, download all teaching resources for free and adapt to suit your pupils' needs...