DECLARE a variable (7a)
Creates a variable called Counter with the data type INTEGER. Form: DECLARE <identifier> : <data type>. Use one DECLARE line per variable.
Understanding DECLARE a variable (7a) in IGCSE Computer Science Paper 2
What it does: The form is DECLARE <identifier> : <data type>, so Counter is the identifier and INTEGER is the data type. Each variable gets its own DECLARE line, so Score and GameOver are declared separately. REAL stores numbers with a decimal part. INTEGER can only store whole numbers, so it cannot hold 12.50. A BOOLEAN variable holds TRUE or FALSE. STRING is for text, so it is the wrong type for a TRUE/FALSE flag. DECLARE only creates the variable and sets its type. A value is given later using an assignment (←) or INPUT.
Common mistakes: The colon between the identifier and the data type is missing. It should be DECLARE Counter : INTEGER. Each DECLARE line creates only one variable. Lives and Level need separate DECLARE lines, so line 2 should be DECLARE Lives : INTEGER.
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 17–26) and word search (Modules 1–26).
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
DECLARE Counter : INTEGERFill in the Blanks
Spot the Error
Student with a class code? Join your class →