GCSE · Computer Science · AQA · Spec 8525

String data type

Every value a program holds has a data type, and string is one of them. Pick an incorrect one and errors can follow.

Computer Science · Watch it happen

Four values, four data types

Step through one line at a time and watch the table fill. Each variable holds a value of a different data type, and string is one of them.

Before you press Next: which data type do you think the first line creates?

1 word ← "Hello"
2 count ← 3
3 price ← 2.5
4 done ← True
wordcountpricedone
"Hello"

Output

 

Step 1: word holds "Hello". This is the string data type, so word is a string variable.

1 / 4

Press Next one line at a time. Before each step, guess which data type the line creates, then check.

Step 1 of 4: word holds "Hello". This is the string data type, so word is a string variable..

Watch out: The general names are integer, real, Boolean, character and string. A language may use other names for the same data types.
UK note

AQA exams use the general names integer, real, Boolean, character and string.

Be honest · Data types

What do you think about data types?

A student is revising data types in Computer Science. They know that string is a data type but are not sure what else they need to remember.

Which is closest to what you think right now? Be honest: nobody's marking this one.
How sure are you?

Your turn · Data type names

General name or not?

Is each name one of the five general names, or not?

Still to sort

A general name (0)

One of integer, real, Boolean, character and string.

Where the line is: If it is one of the five general names, use it as it is.

Not a general name (0)

Not one of the five.

Where the line is: If it is not one of the five, use one of the five general names instead.

7 of 7 still to sort.

Pick a name, choose where it goes, then read why.

UK note

AQA exams use the general names integer, real, Boolean, character and string.

Put it into words

Name them, then explain

(a) State two of the general data type names. (b) Explain why a programmer needs to choose the correct data type for a value. [3 marks]

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

UK note

AQA exams use the general type names integer, real, Boolean, character and string. A language may use other names, so write the general ones.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

String is one of the common data types. Using an incorrect data type can cause errors.

What you need to know

  • A data type tells the program what kind of value it's holding.
  • String is one of the common data types.
  • Have a goWhat does a data type tell the program?

    What kind of value it is holding.

    A data type tells the program what kind of value it's holding.

  • Common data types include integers, floating point numbers, strings and Booleans.
  • In exams AQA uses the general names integer, real, Boolean, character and string.
  • Have a goWhich of these is not a common data type: integer, Boolean, loop or string?

    Loop.

    Common data types include integers, floating point numbers, strings and Booleans. A loop is not one of them.

  • Character is one of the five general names, alongside integer, real, Boolean and string.
  • A language may use other names for these data types.
  • Have a goAn exam asks for a data type. Which should you write: "string" or "text"?

    "string".

    In exams AQA uses the general names integer, real, Boolean, character and string. "text" is not on that list.

  • Choose the data type that suits the value being stored.
  • Using an incorrect data type can cause errors.

The big picture

A data type tells a program what kind of value it is holding. Common data types include integers, floating point numbers (reals), strings and Booleans, and string is the one this lesson is about. In exams AQA uses the general names integer, real, Boolean, character and string, even though a language may use other names. Using an incorrect data type can cause errors.

Key points

1A data type is the kind of value a variable holds.
2String is one of the common data types.
3Common data types include integers, floating point numbers (reals), strings and Booleans.
4In exams AQA uses the general names integer, real, Boolean, character and string.
5A programming language may use other names for these data types, but exam answers use the general names.
6Using an incorrect data type can cause errors.

Worked example

Problem

A student is asked to name one common data type and writes "words". Show how to give an answer that earns the mark.

⚠ Watch out

Writing a language's own name for a data type, or a made-up name like "text", in an exam. A language may use other names, but AQA uses the general names integer, real, Boolean, character and string. Write those.

🧠

Memory hook

Five exam names: integer, real, Boolean, character, string. Choose the right type, because an incorrect one can cause errors.

✓

Check yourself

From memory: which five general data type names does AQA use in exams, and what can using an incorrect data type cause?

Flashcards

(8)
What is a data type?
The kind of value a variable holds.
Is string a data type?
Yes. String is one of the common data types.
Name four common data types.
Integer, floating point (real), string and Boolean.
Which five general names does AQA use in exams?
Integer, real, Boolean, character and string.
Can a language use other names for data types?
Yes. A language may use other names for these data types.
What does it mean to use a data type appropriately?
Choose the data type that suits the value being stored.
What can using an incorrect data type cause?
Errors.
Which is the AQA general name, "string" or "text"?
"string". "text" is not one of AQA's five general names.

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 AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

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 30 October 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.