Telling literals of each type apart
How a literal is written shows its type: digits = INTEGER, decimal point = REAL, single quotes = CHAR, double quotes = STRING, TRUE or FALSE = BOOLEAN.
Understanding Telling literals of each type apart in IGCSE Computer Science Paper 2
What it does: "7" is in double quotes, so it is a STRING and not an INTEGER. Digits only with no decimal point is an INTEGER. A decimal point would make it REAL. The double quotes turn it into text. A BOOLEAN literal is written without quotes. Single quotes around one character make a CHAR, so '7' is a character and not a number.
Common mistakes: 15.0 has a decimal point, so it is a REAL literal. Age is an INTEGER, so it needs a whole number written with digits only: Age ← 15. Double quotes make "3.14" a STRING, not a number. Pi should be a REAL literal written with a decimal point and no quotes: CONSTANT Pi ← 3.14.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 327–336) and word search (Modules 317–336).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
7 7.0 '7' "7" TRUEFill in the Blanks
Spot the Error
Student with a class code? Join your class →