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

Longer programming questions 2 – AQA GCSE Computer Science lesson (8525)

Pupils learn to plan and write a long program that uses subroutines and validation.

Also in a bundle Impacts of Technology and Full Papers – AQA GCSE Computer Science lessons (8525) 11 lessons for £39 · save 11% on buying separately

Lesson 6 of 11 in unit 11.3 Impacts of Technology and Full Papers, taught in Year 11, Spring 1. It answers one big question: How do you plan a long programming answer?

By the end, pupils can plan and write a long program that uses subroutines and validation.

The Build (the main task)
Write a program that: inputs the fare for each journey until 0 is entered; rejects any fare under 0.50 or over 5.00, outputting Invalid fare; keeps a running total of the valid fares that never goes above 6.00; outputs Charged: followed by the amount charged: TapRide caps the amount a passenger pays in a day at £6.00. You should use indentation and meaningful identifiers. (8 marks)
Support version
The bullet points as a checklist with the matching constructs named.
Challenge
Write a function validFare that takes a fare as a parameter and returns True if it is from 0.50 to 5.00 inclusive, and False otherwise. (4 marks) Extend the fare-cap program so that, after Charged:, it also outputs Journeys: followed by the number of valid journeys, and Saved: followed by the money the cap saved the passenger. (6 marks)
Real-world link
TapRide caps what a passenger pays in a day.
Key words
Subroutine, Validation and Logical, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“The cap can be checked once at the end”; “Comparing floats like 0.5 and 5 needs no conversion of the input”.
AQA 8525 specification
3.2.

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 Impacts of Technology and Full Papers 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.