← IGCSE Computer Science Paper 2

LCASE: converting to lower case

Returns the text with every character in lower case, e.g. LCASE("Hi") gives "hi". The original variable is unchanged unless you assign the result to it.

Understanding LCASE: converting to lower case in IGCSE Computer Science Paper 2

What it does: Assigning the returned value back to Name with ← is the only way to store the lower case text in the same variable. LCASE converts a character to lower case, so 'W' becomes 'w'. LCASE is a function, so the value goes inside brackets: LCASE(Name). Characters that are not letters are left as they are. The string is already lower case, so it is unchanged.

Common mistakes: Cambridge pseudocode has no LOWER function. The function that converts to lower case is LCASE, so the line should be OUTPUT LCASE(Word). A DECLARE statement needs a colon between the identifier and the data type. It should be DECLARE Letter : CHAR.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 347–357) 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.

Learning
Duo
What does LCASE('W') return?
'w''W'
Matches
LCASE(Name) OUTPUT Name
↓
The result of LCASE is thrown away, so Name is unchanged and OUTPUT shows the original text. It should be Name ← LCASE(Name).
Applying
Meanings
Term
LCASE(Text)
Meaning
Returns the text with every character in lower case, e.g. LCASE("Hi") gives "hi". The original variable is unchanged unless you assign the result to it.
Practice
DECLARE Word : STRING
Testing
Gaps
OUTPUT ("Hi")
Check Answer
Spots
2Word ← "HELLO"
3OUTPUT LOWER(Word)

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Ostrich' badge — Full Sprint, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does LCASE('W') return?
A. 'w' ✓
B. 'W'
LCASE converts a character to lower case, so 'W' becomes 'w'.
2. Which line correctly converts a STRING called Name to lower case?
A. LCASE Name
B. LCASE(Name) ✓
LCASE is a function, so the value goes inside brackets: LCASE(Name).
3. Name ← "HELLO" then OUTPUT LCASE(Name). What does Name hold after this?
A. "HELLO" ✓
B. "hello"
LCASE returns a new value. Name is unchanged unless you assign the result back to it.
4. Which statement actually changes the stored value of Name to lower case?
A. LCASE(Name)
B. Name ← LCASE(Name) ✓
The result of LCASE must be assigned with ← or the original variable stays the same.
5. What does LCASE("Hi There") return?
A. "hi there" ✓
B. "hi There"
LCASE changes every character in the string to lower case, not just the first one.

Match the Pairs

LCASE("HELLO") → Returns the string "hello" with every letter in lower case
LCASE('W') → Returns the CHAR 'w'
LCASE does not change the original variable unless the result is assigned back to it → Name ← LCASE(Name)
LCASE is the opposite of UCASE: it converts text to lower case instead of upper case → Answer ← LCASE(Reply)
LCASE(Name) OUTPUT Name → The result of LCASE is thrown away, so Name is unchanged and OUTPUT shows the original text. It should be Name ← LCASE(Name).
Word ← LCASE "HELLO" → The argument is missing its brackets. It should be LCASE("HELLO").

Key Term

LCASE(Text)
Returns the text with every character in lower case, e.g. LCASE("Hi") gives "hi". The original variable is unchanged unless you assign the result to it.

Fill in the Blanks

1. OUTPUT LCASE("Hi")
Hint: Type the function name that converts text to lower case.
2. Big ← UCASE(Word) Small ← LCASE(Word)
Hint: Type the function that is the opposite of UCASE and gives lower case text.
3. Name ← LCASE(Name)
Hint: Type the assignment operator that stores the result back into the variable.
4. DECLARE Word : STRING Word ← "HELLO" OUTPUT LCASE(Word)
Hint: Type the variable name whose text is being converted.
5. DECLARE Initial : CHAR Initial ← LCASE('W')
Hint: Type the data type used for a single character value.

Spot the Error

Question 1
A DECLARE Word : STRING
B Word ← "HELLO"
C OUTPUT LOWER(Word)
Line C — Cambridge pseudocode has no LOWER function. The function that converts to lower case is LCASE, so the line should be OUTPUT LCASE(Word).
Question 2
A DECLARE Letter CHAR
B Letter ← 'W'
C OUTPUT LCASE(Letter)
Line A — A DECLARE statement needs a colon between the identifier and the data type. It should be DECLARE Letter : CHAR.
Question 3
A Name ← 'ANNA'
B Small ← LCASE(Name)
C OUTPUT Small
Line A — Single quotes are for a single CHAR. A STRING such as ANNA needs double quotes, so it should be Name ← "ANNA".
Question 4
A DECLARE Text : STRING
B Text ← Hello World
C Text ← LCASE(Text)
D OUTPUT Text
Line B — A string literal must be inside double quotes. Without them Hello World is not a valid value. It should be Text ← "Hello World".
Question 5
A DECLARE Code : STRING
B Code ← "ABC"
C LCASE(Code) ← Code
D OUTPUT Code
Line C — The ← operator assigns the value on its right to the variable on its left. The variable must be on the left, so it should be Code ← LCASE(Code).

Student with a class code? Join your class →