GCSE · Computer Science · Eduqas · Spec C500QS
Boolean data type
Is the torch on? Yes or no. That tiny question hides a decision every programmer makes: what kind of data is this, and how should the computer store it?
Computer Science · Data types
Boolean or not?
For each item of program data, ask one question: could it ever be anything other than one of two states? Pick the item, then pick where it belongs.
Still to sort
Suits Boolean (0)
Can only ever be in one of two states.
Where the line is: If it can only ever be in one of two states, it suits Boolean. A third state, or a free choice of answers, takes it out.
Needs a different data type (0)
Can be in more than two states, or can be anything.
Where the line is: A third answer, or typed text that could be anything, means it is not two-state data, even if it sounds like yes or no.
Eight items from real programs. Commit to your call first, then read why.
Why data types matter
Reason it through
Why does it matter which data type you choose?
First link · your turn
What does a data type tell the computer about a piece of data?
Computer Science · Data types
Run it and see what goes wrong
A game asks the player: Do you want sound on? The player answered yes. The program should print Sound on. Press Run and check what it prints against what you expect.
- sound_on = "yes"
- if sound_on == True:
- print("Sound on")
- else:
- print("Sound off")
The messages and outputs are what Python 3.13 gives for this exact code.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Spot data that can only ever be one of two things, and store it as true or false.
What you need to know
- A data type tells the computer what kind of data it is holding and what actions can be performed on it.
- Boolean is one of the common data types programs use.
- A Boolean holds one of only two values: true or false.
Have a goSam says a Boolean can hold true, false or maybe. Who is right: Sam, or the bullet you just read?
The bullet. A Boolean holds only true or false. There is no maybe.
Only two values exist, so a third answer simply cannot be stored in a Boolean.
- Boolean is the suitable data type when an item of data can only ever be in one of two states.
- The answer to a yes or no question is the classic case: yes is stored as true and no is stored as false.
Have a goA sign-up form has a tick box: Send me the newsletter. Does it suit Boolean? If so, what is a ticked box stored as?
Yes, it suits Boolean. A ticked box is stored as true.
The box can only ever be ticked or not ticked, and ticked is the yes case, so it is stored as true.
- The word yes in speech marks is just text. The Boolean value is true.
- If an item could ever be anything else, such as a third answer, it is not Boolean data.
Have a goPriya says: A student is present or absent, so attendance is Boolean. But her school also records late. Is she right?
No. With late there are three states, so it is not Boolean data.
Boolean suits data that can only ever be in one of two states, however two-way it sounds at first.
- A program needs to know the data type so it can store and process the data correctly.
- Using an incorrect data type can cause errors in a program.
The big picture
A Boolean is a data type that holds one of only two values: true or false. It is the suitable choice when an item of data can only ever be in one of two states, such as the answer to a yes or no question. Choosing an incorrect data type can cause errors in a program.
Key points
Worked example
Problem
A booking program lets a customer pick a delivery slot: morning, afternoon or evening. A programmer wants to store the choice as a Boolean. Decide whether that works.
⚠ Watch out
Treating anything that looks like yes or no as Boolean. The word yes typed as text is not a Boolean value, and an answer with a third option, such as yes, no or maybe, cannot be stored as a Boolean. A Boolean holds only true or false.
Memory hook
Two states, never a third. Ask: could it ever be anything else? If never, it is Boolean.
Check yourself
Cover the page. Explain in your own words how you decide whether an item of data suits Boolean, then say what happens if you pick an incorrect data type.
Flashcards
(8)What does a data type define?
How many values can the Boolean data type hold, and what are they?
When is Boolean the suitable data type?
How is the answer to a yes or no question stored as a Boolean?
A reply can be yes, no or maybe. Why can it not be a Boolean?
Is the word yes, stored as text, a Boolean value?
Why does choosing the correct data type matter?
What can using an incorrect data type cause?
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 Eduqas GCSE Computer Science topics
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.