UCASE: converting to upper case
UCASE(x) returns the string or CHAR x with every letter in upper case. UCASE("Happy") returns "HAPPY". The original variable only changes if you assign the result.
Understanding UCASE: converting to upper case in IGCSE Computer Science Paper 2
What it does: Assigning the result back to Name is the only way the stored value becomes upper case. Whether the user types yes, Yes or YES, UCASE turns it into YES before the comparison, so all versions match. Assignment in Cambridge pseudocode uses ←, with the variable on the left and the expression on the right. UCASE works on both a STRING and a CHAR. Converting the input to upper case first means yes, Yes and YES are all treated the same. Only letters change. Digits and spaces stay the same, so the result is "ROOM 7B". UCASE returns a new value and does not change the variable, so the result must be assigned or output directly.
Common mistakes: The Cambridge pseudocode function is UCASE, not UPPER. The line should be OUTPUT UCASE(word). The quotes make this the text "name" instead of the variable. It should be OUTPUT name so the upper case value is shown.
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 337–346) and word search (Modules 337–357).
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
UCASE(x)Fill in the Blanks
Spot the Error
Student with a class code? Join your class →