GCSE · Computer Science · Eduqas · Spec C500QS

Records

Your game account has a username, a password and a score, all belonging to one player. How does a program keep them together?

​

Computer Science · Records

One player, three ways to see the same record

  1. 1 Find
  2. 2 Find
  3. 3 Explore
  4. 4 Translate
  5. 5 Spot the mismatch
  6. 6 Challenge

Model. One invented player with three fields. Python has no built-in record, so the dictionary stands in for one. A dictionary does not write data types down: quotes mark text and a bare number is an integer.

Step 1 · Find

In the record table, tap any part that belongs to the field holding a whole number.

Field nameData typeData

The same record laid out as a table: one row for each field.

Computer Science · Designing a record

Design a record for one library book

Pick an item, then pick where it goes: which data type would that field hold, or is it not about this book at all?

Still to sort

String field (0)

Text: letters, words, symbols.

Where the line is: Data you would read as words. If it is written in quotes in a dictionary, it is a string.

Integer field (0)

A whole number, with no decimal part.

Where the line is: Counts and whole-number values. If it needs a decimal point, it is not an integer.

Real field (0)

A number that can have a decimal part.

Where the line is: Numbers like 7.99, where part of a whole matters.

Boolean field (0)

Only two possible values: true or false.

Where the line is: A yes-or-no fact about the book.

Not about this book (0)

It describes something else, so it does not belong in this record.

Where the line is: A record describes one entity. Data about another entity needs a different record.

8 of 8 still to sort.

The entity is one book. Each item is a possible field, shown with an example of its data.

Computer Science · Reading and updating a field

Call the output before the program shows it

Step through the program. At each marked step, call what comes next before it is shown. Nothing is run: every value is authored.

player = {"Username": "Mira_K", "Password": "7goatsEating", "Score": 8120}
print(player["Username"])
player["Password"] = "goalPost99"
print(player["Score"])
print(player["Password"])

Variables

Score=8120Password=7goatsEatingUsername=Mira_K

Step 1. The record is built: three fields, each found by its key. This first step is done for you.

Step 1 of 5Called right: 0 of 3

Computer Science · Dictionary syntax

One line has a slip

Aisha writes a record for one student as a Python dictionary. One line breaks the dictionary syntax. Which line is it?

Aisha's code — which line goes wrong?

Computer Science · Your turn

Design it, write it, update it

A music app stores a record about one song. Its data is: title Sunrise, artist The Lamps, length 215 seconds. (a) Name the entity. (b) Give a field name and a data type for each item of data. (c) Write the record as a Python dictionary. (d) Write one line that changes the length to 230. [6 marks]

0 words · your answer stays on this page and is not sent anywhere.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Keep everything about one thing together, then find each piece by its name.

What you need to know

  • A data structure stores data in an organised and accessible way. A record is one example.
  • A record stores a collection of attributes (data items) about a single entity: one object, place, person or thing.
  • An attribute is a property or characteristic of the entity. Attributes are also called fields.
  • Each field has a name and holds data, so a record holds the field names and the data stored in them.
  • The fields of one record can hold different data types, for example strings and an integer together.
  • Have a goYour classmate Jo insists: "A record can't hold a username and a score together. One is text and the other is a number." Is Jo right?

    No. The fields of one record can hold different data types.

    Mixing types in one record is normal: a string field and an integer field can sit side by side, because each field has its own data type.

  • Designing a record means choosing the entity, then deciding each field name and its data type.
  • Have a goYou are designing a record for one trading card. Name two fields for it and give each a data type.

    For example Name (string) and Attack (integer).

    Choose the one thing the record describes first, then give each of its properties a name and a data type that fits its data.

  • Python has no native record data structure. A dictionary can be used to represent one.
  • A dictionary is data pairings found by a key. For a record, each key is a field name paired with its data.
  • Python writes a dictionary in curly brackets, with a colon between each key and its data.
  • Read a field by naming its key, not by a position. Assigning to one key updates only that field.
  • Have a goSam says pet[1] gets the age out of pet = {"Name": "Biscuit", "Age": 4}, because Age is the second thing. What would you write instead?

    pet["Age"]

    A field is found by naming its key, not by counting along to a position number.

The big picture

A record groups named fields about one entity. Python has no built-in record, so a dictionary stands in: each key is a field name, paired with that field's data. You read a field by naming its key, and updating one field leaves the others alone.

Key points

1A record is a data structure that groups the attributes (fields) of a single entity together.
2Each field has a name and holds data. The fields of one record can have different data types.
3Designing a record: choose the entity, then decide each field name and its data type.
4Python has no native record, so a dictionary represents one: each key is a field name paired with its data.
5A dictionary is written in curly brackets with a colon between each key and its data.
6Read a field by naming its key. Assigning a new value to one key changes only that field.

Worked example

Problem

A hotel needs a record for one room: room number 12, type double, on floor 1. Design the record, write it as a Python dictionary, then change the type to family.

⚠ Watch out

Thinking a field is found by its position, or that changing one field rewrites the whole record. A field is found by naming its key, and assigning to one key changes only that field's data.

🧠

Memory hook

Think of a form with labelled boxes. The label (the key) tells you which box, so the order of the boxes never matters. Fill in one box and the others stay as they were.

✓

Check yourself

Pick any entity from your life. Name its fields and their data types, write it as a dictionary, then say what happens to the other fields when you update one.

Flashcards

(12)
What is a data structure?
A way of storing data in an organised and accessible way.
What is a record?
A data structure that stores a collection of attributes (data items) about a single entity, grouping related data about one thing together.
What is an entity?
A single object, place, person or thing that a record holds data about.
What is an attribute?
A property or characteristic of an entity. Attributes are also called fields.
What does a record actually hold?
The field names (attributes) and the data stored in them.
Can one record mix data types?
Yes. Its fields can hold different data types, such as string fields and an integer field together.
What do you decide when you design a record?
The entity it describes, then each attribute (field name) and its data type.
Does Python have a native record?
No. A dictionary can be used to represent one.
In a dictionary that represents a record, what is a key?
A field name. It identifies the attribute and is paired with that attribute's data.
How is a dictionary written in Python?
In curly brackets, with a colon separating each key from its data.
How do you read one field's data from a dictionary record?
Name the field (its key), for example print(player["Username"]). You do not use a position number.
What happens to the other fields when you assign a new value to one key?
Only that field's data changes. The other fields keep their values.

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 posted

More Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)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 16 November 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.