GCSE · Computer Science · AQA · Spec 8525
Records
A car has a make, model, reg, price and number of doors. Three are text, two are numbers. How do you keep them together under one name?
Computer Science · Data structures
Everything about one car, in one variable
A record is a data structure, which is just a way of storing data so it stays organised and easy to get at. Step through this short Python program and keep your eye on the Variables panel.
Before you press Next: how many variables do you think this program needs to hold everything about one car?
1 car1 = {"make": "Ford",2 "model": "Fiesta",3 "reg": "AB12 CDE",4 "price": 8495.0,5 "noOfDoors": 5}6 print(car1["model"])7 car1["price"] = 7995.08 car2 = {"make": "Vauxhall",9 "model": "Corsa",10 "reg": "CD34 EFG",11 "price": 6250.0,12 "noOfDoors": 3}13 cars = [car1, car2]14 print(cars[1]["reg"])
Variables
Output
Step 1: Lines 1 to 5 are one statement, and they make just ONE variable: car1. Each labelled piece (make, model, reg, price, noOfDoors) is called a field. Three fields hold text, price holds a real number and noOfDoors a whole number. Different types, one car. That is a record.
Press Next one step at a time. Each step highlights the line that has just run.
This Car definition, in the RECORD … ENDRECORD layout, is the example record given in the AQA specification.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
One name for everything you know about one thing.
What you need to know
- A data structure stores data in an organised, accessible way. A record is one example of a data structure.
- A record stores a collection of attributes (fields) about a single entity, such as one car.
- The fields in one record can be different data types, e.g. String, Real and Integer.
- Python has no built-in record, so a dictionary is used to represent one. Many records are held as a list of dictionaries.
The big picture
A record groups the attributes of one entity, like one car, under a single name. Its fields can be different data types. Python has no built-in record, so each record is a dictionary, and many records are kept in a list.
Key points
Worked example
Problem
A sports club keeps a record for each member with the fields name : String, age : Integer and feesPaid : Boolean. Write Python to store a member called Priya, aged 15, who has paid, add her to a list called members, then output her age.
⚠ Watch out
Leaving the quotes off a field name. car1[price] looks for a variable called price and fails; car1["price"] asks the record for its price field.
Memory hook
One form per car: the boxes are fields, the form is the record, the stack of forms is the list.
Check yourself
Cover the page. What does one record hold, and how would you store three records in Python?
Flashcards
(11)What is a data structure for?
What does a record store?
What is an entity?
What is a field?
Must all the fields in a record be the same data type?
Which two keywords open and close a record definition?
How is each field written inside a record definition?
Does Python have a built-in record data structure?
Record definition vs Python dictionary: which one holds actual values?
How do you read the reg field of the dictionary car2?
How do you store many records in Python?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 29 September 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.