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

Variables, constants, input and output – AQA GCSE Computer Science lesson (8525)

Pupils learn to write a program that uses input, output, variables and a named constant with meaningful identifiers, and read the same steps in AQA pseudo-code.

Also in a bundle Computer Systems and First Programs – AQA GCSE Computer Science lessons (8525) 13 lessons for £39 · save 25% on buying separately

Lesson 4 of 13 in unit 10.1 Computer Systems and First Programs, taught in Year 10, Autumn 1. It answers one big question: How does a program store and use what the user types?

By the end, pupils can write a program that uses input, output, variables and a named constant with meaningful identifiers, and read the same steps in AQA pseudo-code.

The Build (the main task)
Write a program that asks for the trip name and the lead teacher, stores each answer in a variable, and outputs a two-line summary that uses the constant MAX_PLACES, set to 52. (4 marks) Explain why MAX_PLACES is a constant. (1 mark)
Support version
Part-filled code: the constant and the first input line are written; pupils complete the second input and the two output lines.
Challenge
Write a program that asks for a club's name and the day it meets, stores each answer in a variable, and outputs a two-line summary. It must use the constant ROOM, set to "Lab 3". (4 marks) This program should output the trip name and the leader's name, but it does not work. Describe the two errors and write the corrected program. (4 marks) Write the Build program in AQA pseudo-code, using CONSTANT, USERINPUT, ← and OUTPUT (4 marks). Explain why the constant makes the program easier to update if the school changes to a coach with 48 seats (2 marks).
Real-world link
The trip planner starts by asking for the trip's name and lead teacher, and keeps the maximum number of places as a constant.
Key words
Variable, Constant and Assignment, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“When a variable is given a new value, it keeps the old value as well”; “A constant is any number typed straight into the code”.
AQA 8525 specification
3.2.2 (programming concepts: variables, constants, assignment, sequence, meaningful identifiers); 3.2.7 (input and output).

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 Computer Systems and First Programs 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.