Single lesson · Written for AQA GCSE Computer Science (8525)

Nested selection – AQA GCSE Computer Science lesson (8525)

Pupils learn to write and trace nested selection in the class's language and AQA pseudo-code.

Also in a bundle Memory, Storage and Selection – AQA GCSE Computer Science lessons (8525) 12 lessons for £39 · save 18% on buying separately

Lesson 6 of 12 in unit 10.2 Memory, Storage and Selection, taught in Year 10, Autumn 2. It answers one big question: How can a program handle a decision inside a decision?

By the end, pupils can write and trace nested selection in the class's language and AQA pseudo-code.

The Build (the main task)
Write a program for the kiosk using nested selection. It must input whether the visitor is a member (yes or no) and their age. Membership is for ages 5 and over: members under 16 pay £2 and other members pay £4. Non-members pay the full price from lesson 2: under 5 Free, 5 to 15 £3, 16 and over £5. (6 marks)
Support version
Part-filled code with the outer IF and its ELSE written, and the inner IF to complete.
Challenge
Write a program for the climbing wall using nested selection. It inputs whether the climber has done the safety course (yes or no) and their age. Course done and under 12: output With adult. Course done, 12 or over: Alone. No course: Book a course. (5 marks) Complete a trace table for this AQA pseudo-code algorithm for the three customers in the table. (5 marks) Explain when nested selection, with its multiple levels of indentation, is clearer than one condition joined with AND. Use the kiosk's member prices to show your answer, and write the AND version of the member branch in AQA pseudo-code. (6 marks)
Real-world link
The kiosk asks about membership first, then age.
Key words
Nested selection, Indentation and Multiple, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“The inner IF is checked even when the outer condition is False”; “Indentation is just for neatness”.
AQA 8525 specification
3.2.2 (programming concepts: selection and nested selection).

Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.

Pupils need computers for the main task.

Also sold in the Memory, Storage and Selection unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.

Choose your school's Paper 1 language when you buy: C#, Python or VB.NET. You get that language's files: every program, code example, worked answer and programming task is written in it, and lessons with no code are the same in all three. Algorithms are also shown in AQA pseudo-code, as in the exam.

An independent resource written for AQA GCSE Computer Science (8525). It is not endorsed by AQA.

What's included

  • Slide deck (PowerPoint)
  • Lesson plan (Word)
  • Worksheet (Word)
  • Support worksheet with scaffolds (Word)
  • Single-teacher licence: use and adapt it with your own classes
  • Your choice of Paper 1 language: C#, Python or VB.NET

More for GCSE Computer Science (AQA)

See all

Written for the specifications named. Not endorsed by or affiliated with any exam board.