GCSE · Computer Science · Eduqas · Spec C500QS

Integer data type

Store a telephone number as an integer and its first digit quietly vanishes. Let's work out why, and how to choose a data type that doesn't wreck your data.

Sort it

Does it deserve to be an integer?

Ask two questions of each item. Is it always a whole number? And is it a number you work with, or just a label made of digits where a leading zero matters? Tap an item, then choose where it goes.

Still to sort

Integer is suitable (0)

Always whole numbers, and used as numbers.

Where the line is: Whole numbers only. Positive, negative or zero are all fine.

Integer is not suitable (0)

Can have a fractional part, or digits that are only a label.

Where the line is: Either it can have a fractional part, or it is a digit sequence you never calculate with and whose leading zero matters.

6 of 6 still to sort.

What counts as an integer?

Which idea sounds closest to yours?

A classmate is deciding which values could be integers. Which idea sounds closest to what you think?
How sure are you?

Why bother with data types?

?

Reason it through

Why does choosing the right data type matter?

Link 1 of 3

First link · your turn

What does a data type decide about an item of data?

2
Locked — reveal the link above first
3
Locked — reveal the link above first

Run it and see

What does the wrong choice actually do?

This program stores a count of players, a height and a telephone number. Press Run, read what comes back, then choose a fix for the flagged line and run it again. Keep going until the output is right.

You do not need to learn Python syntax here. Read the output and the message, and ask what the data type did.

Python
  1. players = 4
  2. arrivals = 3
  3. print(players + arrivals)
  4. height = int("1.75")
  5. print(height)
  6. phone = int("07700900123")
  7. print(phone)

Messages and outputs checked by running these exact programs in Python 3.13.

Now you say it

State it, then justify it

A school play's booking system stores the number of tickets sold. State whether integer is a suitable data type for this data and justify your answer. [3 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.

Whole numbers, and how to tell when data deserves to be one.

What you need to know

  • A data type tells the computer what kind of data it's storing and what can be done with it.
  • Integer is one common data type. It stores whole numbers, like 3.
  • An integer can be positive, negative or zero, so 42, -7 and 0 are all integers.
  • An integer has no fractional part. A value such as 5.3 is not an integer.
  • Have a goHere are five values: 7, -2, 0, 5.3 and 100. Which one is not an integer?

    5.3

    It has a fractional part. The others are whole numbers, and negative and zero count.

  • Use integer when the values are always whole numbers, like a count of items or a number of people.
  • Don't use integer for data that can have a fractional part, like a measurement with a decimal part.
  • Have a goYour classmate Sam says: 'I'll store my hamster's weight as an integer. It's 34.7 g.' Good plan?

    No. 34.7 has a fractional part, so integer isn't suitable.

    Integer only suits data whose values are always whole numbers; a measurement with a decimal part isn't.

  • Integer values can be used in arithmetic calculations.
  • A telephone number isn't suitable for integer: you never calculate with it, and an integer doesn't keep leading zeros.
  • Have a goWhich one should not be an integer: pupils in a class, a locker code such as 0417, or a goal difference of -2?

    The locker code, 0417.

    You never calculate with it, and its leading zero matters but an integer would drop it. The other two are whole numbers you can work with.

  • Data types exist so data is stored and processed correctly. The wrong type can cause errors.

The big picture

An integer is a whole number: positive, negative or zero, with no fractional part. Use it for data that is always whole, like counts. Don't use it for data with a decimal part, or for digit sequences such as telephone numbers where a leading zero matters.

Key points

1A data type defines the kind of data a computer can store and the actions that can be performed on it.
2The integer data type stores whole numbers, positive, negative or zero, with no fractional part.
3Integer suits data that is always whole numbers, such as counts, and its values can be used in arithmetic.
4Integer does not suit data with a fractional part, or digit sequences such as telephone numbers where leading zeros matter.
5Choosing the wrong data type can cause errors, because data is then not stored and processed correctly.

Worked example

Problem

A quiz app records two things for each player: how many questions they got right (for example 12) and their average answer time (for example 3.4 seconds). Decide whether each should be an integer, then say what the app can do with the one that should.

⚠ Watch out

Thinking anything made of digits is an integer. A telephone number is all digits, but you never calculate with it and its leading zero matters, so integer is the wrong choice.

🧠

Memory hook

Ask two questions: always whole? and do I work with it as a number? Count of people: yes and yes. Telephone number: no, it's just a label made of digits.

✓

Check yourself

Detentions this term (could be 0), mean test score (such as 61.5), locker code (such as 0482). Which one suits integer, and why not the other two?

Flashcards

(11)
What is a data type?
It defines the kind of data a computer can store and the actions that can be performed on it.
What does the integer data type store?
Whole numbers, for example 3.
Which of these are integers: 42, 5.3, -7, 0?
42, -7 and 0. Positive, negative or zero are all fine. 5.3 is not.
Why is 5.3 not an integer?
It has a fractional part. An integer has none.
When is integer a suitable data type?
When the data is always whole numbers, such as a count of items or a number of people.
Why is integer unsuitable for a measurement with a decimal part?
The values can have a fractional part, and an integer cannot hold one.
What can you do with integer values?
Use them in arithmetic calculations.
Why not store a telephone number as an integer?
You never calculate with it, and an integer does not keep leading zeros, so the first 0 would be lost.
Two questions to ask before choosing integer?
Is it always a whole number? Is it a number you work with, or a label made of digits where a leading zero matters?
Why do programs use data types?
So that data is stored and processed correctly.
What can go wrong if you pick the wrong data type?
It can cause errors.

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.