String handling
LENGTH, MID and RIGHT
- The 2026 guide's string routines are
LENGTH,MID,RIGHT,UCASEandLCASE. The exam insert also listsLEFT. - Positions start at 1.
MID(text, start, length)copieslengthcharacters fromstart.RIGHT(text, n)copies the lastncharacters.
OUTPUT LENGTH("Happy Days")
OUTPUT MID("ABCDEFGH", 2, 3)
OUTPUT RIGHT("ABCDEFGH", 3)
UCASE and LCASE take one character
- The guide's
UCASEandLCASEtake a single character, not a whole string. UCASE('h')is'H'. A character that is not a letter comes back unchanged.- When a paper needs a whole string in capitals, the insert gives you
TO_UPPER.
OUTPUT UCASE('h')
OUTPUT LCASE('W')
OUTPUT TO_UPPER("Error 803")
& joins strings
&concatenates two strings."Summer" & " " & "Pudding"is"Summer Pudding".- IGCSE 0478 has no
&. There you list values afterOUTPUTwith commas. - Commas still work in this guide when you only want them printed side by side.
OUTPUT "Summer" & " " & "Pudding"
Common mistakes
MIDcounts from 1. The second argument is the start, the third is how many characters.- Do not pass a whole string to
UCASE. That routine is for one character.
Now you try
- Use
MID,RIGHTand&.
Independent transfer
The final task has no supplied algorithm. Plan its inputs, processing and outputs, then solve it before opening support. Check more than the sample case.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Output MID("ABCDEFGH", 2, 3) and RIGHT("ABCDEFGH", 3), each on its own line.
Click Run to see the output here.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Output Summer Pudding by joining Summer, a space and Pudding with &.
Click Run to see the output here.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Output the upper-case form of the character h, then ERROR 803 using TO_UPPER.
Click Run to see the output here.
Difficulty 3/5 · 200 coins + a small bonus on first completion today
Read a name with at least three characters. Output its first three characters followed by !. Preserve case.
Click Run to see the output here.