Skip to the page
Year 7 · Spring 2 · Scratch I: Programming essentials

Algorithms vs programs: sequence with sprite movement

PracticalPresent ▶

What this lesson covers

Topic 11 Algorithms

KS3 Computing · An algorithm is a precise, step-by-step plan to solve a problem. Computational thinking turns a messy problem into one. Every algorithm is built from just three things: sequence, selection and iteration.

Computational Thinking ProgrammingCambridge Lower Secondary Computing 0860

You will learn to

  • Explain the difference between an algorithm (the plan) and a program (the plan in code).
  • Write precise, ordered steps for a task, like making a jam sandwich.
  • Create a Scratch script that uses sequence: move, turn and say, in order.

Success criteria

  • I can say why 'put jam on the bread' is not precise enough.
  • I can make a sprite follow my steps in the right order.
  • I can predict what my script will do before I click the green flag.

Key words

Say each word, then read what it means. Every one is in the glossary too.

algorithm
Precise, ordered, finite steps to solve a problem.
Decomposition
Breaking a problem into smaller ones.
Abstraction
Ignoring detail that doesn't matter for the problem.
Sequence · selection · iteration
Steps one after another. First this, then this.
Pseudocode
Code-like writing for algorithms, without strict rules.
Trace table
Records variable values step by step to check logic.
Variable
A named place in memory that holds a value.

The explanation

Read it here, or open the study page below to go one step at a time with things to try.

What an algorithm is

A recipe or directions to a friend's house are algorithms. For a computer, an algorithm must be:

  • Precise: no step can be misunderstood.
  • Ordered: steps happen in a set order.
  • Finite: it must stop.
!Watch out

Computers are totally literal. 'Put jam on the bread' could mean putting the jar on the bread.

★Remember

An algorithm is the plan. A program is the plan written in a programming language.

Study it

Open the study page and go one step at a time.

Check yourself

One question at a time. The reason shows after each answer.

Saved on this device.