Computing
ComputingAlgorithms and programming25 min★★ difficulty

Sequence, selection and iteration

Every program ever written is built from three structures. Recognise them and unfamiliar code stops being frightening.

Part of your national curriculum
  • Algorithms and programming: Design, use and evaluate computational abstractions that model the state and behaviour of real-world problems and physical systems
  • Algorithms and programming: Understand several key algorithms that reflect computational thinking, and use logical reasoning to compare the utility of alternative algorithms for the same problem
  • Algorithms and programming: Understand simple algorithms, expressed using sequence, selection and iteration, and correct errors in algorithms

Lesson overview

What you'll learn in this lesson

Design algorithms using sequence, selection and iteration

Key learning points

  • The three structures
  • Planning first

This lesson at a glance

  • 25 minutes
  • 13 parts to scroll through
  • 3 quick checks
  • Marked quiz at the end
  • Gentle pace: short sittings with pauses

Words to know

designalgorithmssequenceselectioniteration

Scroll down — the lesson carries on below

Part 1 of 13 · Discover8%
1

Watch & discover

Part 1 of 13

Sequence, selection and iteration illustrationVisual introduction

Picture this

Sequence, selection and iteration

Every program ever written is built from three structures. Recognise them and unfamiliar code stops being frightening.

In a nutshell

Design algorithms using sequence, selection and iteration

2

Explore the idea

Part 2 of 13

Learn

The three structures

Sequence runs steps in order. Selection chooses with if/else. Iteration repeats with for or while loops.

3

Explore the idea

Part 3 of 13

Learn

Planning first

Write the steps in plain English or pseudocode before typing. Decomposition — breaking one big problem into small ones — is the actual skill.

4

Reset break

Part 4 of 13

Pause

That's sitting 1 of 3 done

Stretch, get a drink, look out of the window. There is no timer and nothing is counting down — your place is saved, so you can come back in five minutes or tomorrow.

Stop here for now
5

Quick check

Part 5 of 13

Quick check

An if/else statement is…

6

Quick check

Part 6 of 13

Quick check

A while loop is an example of…

7

Quick check

Part 7 of 13

Quick check

Decomposition means…

8

Reset break

Part 8 of 13

Pause

That's sitting 2 of 3 done

Stretch, get a drink, look out of the window. There is no timer and nothing is counting down — your place is saved, so you can come back in five minutes or tomorrow.

Stop here for now
9

Challenge round

Part 9 of 13

Game · Sort it

Which of these are true?

Drag each card into the right column. Tap a card first if dragging is fiddly.

True

Not true

10

Challenge round

Part 10 of 13

Game · Fill the gaps

Finish the sentences

Choose the word that belongs in each gap.

____ runs steps in order.

____ chooses with if/else.

____ repeats with for or while loops.

11

Challenge round

Part 11 of 13

Game · Recall cards

An if/else statement is…

Card 1 of 4

12

Mastery quiz

Part 12 of 13

Marked quiz

End of lesson quiz: Sequence, selection and iteration

4 questions, marked with the reasoning shown. No timer.

  1. 1. An if/else statement is…

  2. 2. A while loop is an example of…

  3. 3. Decomposition means…

  4. 4. An algorithm repeats 'move forward' until a wall is reached, then turns right. Which programming ideas does it use?

13

Lesson round-up

Part 13 of 13

Lesson round-up

Ready when you are

Quiz score

Not sat

Games

Not played

Points this lesson

0

Best run

0 in a row

Luna: 0 out of 3 on the practice checks. Only if you feel up to it — one more?

Ask Luna

Part 1 of 13 · Watch & discover

How this is going

  • Not looked at yet

    Design, use and evaluate computational abstractions that model the state and behaviour of real-world problems and physical systems

  • Not looked at yet

    Understand several key algorithms that reflect computational thinking, and use logical reasoning to compare the utility of alternative algorithms for the same problem

  • Not looked at yet

    Understand simple algorithms, expressed using sequence, selection and iteration, and correct errors in algorithms

Good Learning Co. — personalised UK curriculum learning, built around what each learner loves.