UCASE and LCASE functions
UCASE returns a string or character in upper case, e.g. UCASE("Happy") gives "HAPPY". LCASE returns it in lower case, e.g. LCASE('W') gives 'w'.
Understanding UCASE and LCASE functions in IGCSE Computer Science Paper 2
What it does: Converting the input with UCASE means only one upper case value needs to be compared, whatever case the user typed. LCASE returns the lower case version of Name, and the assignment saves it in the variable LowerName. Keywords and function names in Cambridge pseudocode are written in capital letters, so it is LCASE, not lcase. UCASE and LCASE let you compare answers regardless of case. They do not check data types, which is the job of a type check. UCASE never makes lower case. Letters that are already capitals stay as capitals. UCASE converts all the letters of the string it is given into capital letters.
Common mistakes: A string of several characters must be written in double quotes. Single quotes are only for a single CHAR. It should be Word ← "Happy". LCASE makes the answer lower case, so it can never equal "YES". To compare with "YES" the answer must be converted with UCASE(Answer).
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 37–46) and word search (Modules 27–46).
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) and LCASE(x)Fill in the Blanks
Spot the Error
Student with a class code? Join your class →