First character at position zero or one
Position 1 is the first character in Cambridge pseudocode, so this returns the first letter. Some languages count from 0 instead, so state which numbering you use.
Understanding First character at position zero or one in IGCSE Computer Science Paper 2
What it does: Start 1 means the first character, and length 3 takes three characters, giving the first three letters. Position 2 is the second character with one-based numbering ('A'), but under zero-based numbering it is the third character ('T'), so the numbering must be stated. Cambridge pseudocode generally counts from 1. Some programming languages count from 0, but that is not the syllabus default. P is 1, y is 2, t is 3, h is 4. Starting at position 2 and taking 3 characters gives yth. The result depends on the numbering rule, so stating it makes your answer clear and shows your reasoning.
Common mistakes: Cambridge pseudocode numbers the first character as position 1, so position 0 does not exist. The start position should be 1 to get the first letter. Position 2 is the second character, so this would output y, not P. To get the first letter the start position must be 1.
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
SUBSTRING(Word, 1, 1)Fill in the Blanks
Spot the Error
Student with a class code? Join your class →