Selection: IF, ELSE and ELSE IF – AQA GCSE Computer Science lesson (8525)
Pupils learn to write selection with IF, ELSE and ELSE IF in the class's language and read it in AQA pseudo-code.
Lesson 2 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 make a different choice for different users?
By the end, pupils can write selection with IF, ELSE and ELSE IF in the class's language and read it in AQA pseudo-code.
- The Build (the main task)
- Write a program that inputs a visitor's age and uses selection to make one decision, the swim price: under 5 is Free, 5 to 15 is £3, and 16 and over is £5. (5 marks)
- Support version
- Part-filled code with the IF line written and the ELSE IF and ELSE lines to complete.
- Challenge
- Write a program that inputs a swimmer's score out of 50 and outputs Gold for 40 or more, Silver for 25 to 39, and Bronze otherwise. (5 marks) Complete a trace table for the Build's swim price program with the ages 4, 5, 15 and 16. Then explain why these four ages are better tests than 2, 10 and 30. (6 marks) A pupil writes the swim price algorithm with the conditions in this order. Explain why a 3-year-old is given the wrong price, and write the algorithm in AQA pseudo-code in a working order. (6 marks)
- Real-world link
- The leisure centre kiosk prices a swim by the visitor's age.
- Key words
- Selection, Condition and Decision, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “Every IF and ELSE IF branch runs if its condition is true”; “= and == mean the same in code”.
- 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 allPupils learn to explain what main memory is, why the CPU needs it and why it is volatile.
Pupils learn to describe what RAM, ROM, cache and registers are each used for and why each is needed.
Pupils learn to use relational operators and NOT, AND and OR in conditions, in the class's language and AQA pseudo-code.
Written for the specifications named. Not endorsed by or affiliated with any exam board.