Programming and the longer code questions – AQA GCSE Computer Science lesson (8525)
Pupils learn to write code on paper for long code questions, earning design and program marks, and use subroutines, validation and records.
Lesson 2 of 7 in unit 11.4 Revision, taught in Year 11, Spring 2. It answers one big question: How do I write a program on paper that scores?
By the end, pupils can write code on paper for long code questions, earning design and program marks, and use subroutines, validation and records.
- What happens
- Bell Task: four constructs to translate from AQA pseudo-code into the class's language. Reteach 1: the missing loop for repeated input (examiners' most common loss). Reteach 2: return versus output in functions. Build: an 8-mark and an 11-mark code question on Kickstand's order system, marked with design and program marks. The Challenge adds records, written in AQA pseudo-code. Challenge: Kickstand stores each order as a record: RECORD Order orderNo : Integer, price : Real, pairs : Integer ENDRECORD. The array orders holds 20 Order records. Write AQA pseudo-code that outputs the total value of all the orders, where an order's value is its price × its pairs (4 marks); Extend your part (b) answer so that, after the other outputs, it also outputs Free delivery: followed by the number of valid orders of 50 or more, and outputs No orders instead of the three totals if no valid order was entered (4 marks); Rewrite the validation in your part (a) answer as a function getSize that inputs a shoe size, keeps asking until it is from 3 to 13 and returns it. Use getSize in the main program, then output In stock: followed by the pairs of that size (5 marks).
- Main task
- Write a program that: uses validation to input a shoe size, asking again until it is from 3 to 13; outputs Sold out if there are no pairs of that size in the array stock; otherwise inputs the number of pairs wanted and, if there are enough, takes them off the stock and outputs Pairs left: followed by the new number, or outputs Not enough stock. You may use stock as declared. You should use indentation and meaningful identifiers (8 marks). Write a program for the end of Kickstand's day that: inputs the total of each order, in pounds, until 0 is entered; outputs Check total for a total below 0 or over 500 and does not count it; adds 4.99 delivery to any order under 50; keeps a running total of the money taken, including delivery; after the last order, outputs Orders: with the number of orders, Taken: with the money taken and Largest: with the largest order total. You should use indentation and meaningful identifiers (11 marks).
Also sold in the Revision 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 trace, explain and compare linear and binary search and bubble and merge sort, and explain efficiency.
Pupils learn to convert between number bases, add binary numbers, apply shifts and calculate image, sound and Huffman sizes without a calculator.
Pupils learn to explain the CPU's components and the Fetch-Execute cycle, memory and storage, software, languages and translators, and Boolean logic.
Written for the specifications named. Not endorsed by or affiliated with any exam board.