Paper 2 Overview (Algorithms & Programming)

Paper 2 accounts for 50% of your total IGCSE Computer Science qualification. Writing precise, mark-scheme compliant pseudocode is essential for achieving an A* (Grade 9).

Practice Questions ➔ Launch Compiler ➔

1. The 15-Mark Extended Scenario Question: 5-Step Formula for Top Marks

The 15-mark question at the end of Paper 2 is where candidates either secure their A* or lose up to 12 marks. Examiners assess five core algorithm requirements. Follow this 5-step blueprint:

Step 1: Declare All Variables & 1D Arrays at the Top (2–3 Marks)

Never introduce variables midway without declaring them. Look at the scenario requirements and declare fixed arrays with clear 1-based bounds (e.g. ARRAY[1:50]) and descriptive identifiers.

DECLARE StudentName : ARRAY[1:50] OF STRING
DECLARE StudentMark : ARRAY[1:50] OF INTEGER
DECLARE Total : INTEGER

Step 2: Initialize Accumulators & Flags Before Loops (2 Marks)

Initialize all totals, counters, highest/lowest trackers, and boolean flags before opening iteration loops. Failing to set Total ← 0 or Highest ← -1 is heavily penalized.

Total ← 0
PassCount ← 0
Highest ← -1

Step 3: Implement Post-Condition Input Validation (3–4 Marks)

Scenarios always demand validating user input within a defined range (e.g. mark between 0 and 100) or checking for specific choices. Always use a REPEAT...UNTIL loop with an error prompt.

REPEAT
    OUTPUT "Enter exam mark (0 to 100): "
    INPUT Mark
UNTIL Mark >= 0 AND Mark <= 100

Step 4: Use Parallel Arrays & Traversal Loops (3–4 Marks)

Store student names and marks in parallel index positions using a count-controlled FOR loop from 1 to N, updating running totals inside the loop.

FOR i ← 1 TO 50
    Total ← Total + StudentMark[i]
    IF StudentMark[i] >= 50 THEN
        PassCount ← PassCount + 1
    ENDIF
NEXT i

Step 5: Output Formatted Results with Contextual Labels (2 Marks)

Calculate the average (Average ← Total / 50) and print every requested summary statistic with descriptive strings. Do not simply print raw numbers!

OUTPUT "Class Average Mark: ", Average
OUTPUT "Number of Students Passed: ", PassCount

2. Official Cambridge 0478 Pseudocode Keyword & Syntax Checklist

Ensure you use only official CAIE keywords in Paper 2 answers. Avoid informal programming jargon:

Variable Declaration DECLARE <id> : <type>

Types: INTEGER, REAL, CHAR, STRING, BOOLEAN

Constant Declaration CONSTANT <id> = <value>

Example: CONSTANT MaxMarks = 100

Assignment Operator Identifier ← Expression

Always use left arrow ←. Never use single equals =

User Input & Output INPUT <id>
OUTPUT <expr>

Separate multiple expressions with commas

Count-Controlled Loop FOR i ← 1 TO N ... NEXT i

Optional STEP clause for non-unit increments

Pre-Condition Loop WHILE <cond> DO ... ENDWHILE

Condition tested before loop body execution

Post-Condition Loop REPEAT ... UNTIL <cond>

Body executes at least once; exits when True

Conditional Selection IF <cond> THEN ... ELSE ... ENDIF

Use CASE OF <id> ... OTHERWISE ... ENDCASE for multiple values

File Handling OPENFILE "f.txt" FOR READ
READFILE "f.txt", Data
CLOSEFILE "f.txt"

Check EOF with WHILE NOT EOF("f.txt") DO

3. Standard Cambridge Algorithms: Counting, Totals, Max/Min & Bubble Sort

Every Paper 2 exam tests one or more standard syllabus algorithms. Be prepared to reproduce these by memory:

4. Top 5 Examiner Traps That Cost Marks on IGCSE Paper 2

⚠️ Mark Scheme Red Flags: Cambridge examiners report these five mistakes year after year:
  1. Using 0-Based Array Indexing: Cambridge 0478 arrays are 1-based by default. Writing FOR i ← 0 TO 9 for an array declared [1:10] loses the array traversal mark.
  2. Using Single Equals for Assignment: Writing X = Y + 1 instead of X ← Y + 1. In Cambridge pseudocode, = is strictly an equality comparison operator.
  3. Failing to Close Blocks: Leaving out ENDIF, NEXT i, ENDWHILE, or ENDCASE will cost syntax marks.
  4. Division Confusion (DIV vs MOD vs /): Remember that / performs real division (with decimal fractions), DIV performs integer division (quotient only), and MOD yields the remainder.
  5. Overwriting Variables in File Loops: Forgetting to process or accumulate the variable read from a file before the next READFILE overwrites it.

5. Frequently Asked Questions: Cambridge IGCSE 0478 Pseudocode

How do I write pseudocode that gets full marks on the 15-mark question?

Declare all variables and arrays at the top, initialize accumulators, validate inputs using a REPEAT...UNTIL loop, use descriptive variable names, and provide clear output prompts matching all bullet points in the question.

Is Cambridge O-Level 2210 pseudocode the same as IGCSE 0478?

Yes. Cambridge O-Level 2210 shares the identical pseudocode syllabus and Paper 2 mark schemes as IGCSE 0478. You can use our O-Level 2210 Guide as well.

Can I run my Cambridge IGCSE pseudocode online to check for errors?

Yes! Test your algorithms inside the PseudoStudio Online Compiler. Our cloud engine compiles Cambridge syntax with real-time error messages, interactive terminal input, and trace tables.

Where can I practice IGCSE Paper 2 pseudocode past papers?

Visit our AI Practice Workspace, which features 200+ Cambridge IGCSE questions categorized by topic (loops, arrays, file handling) with automated AI mark-scheme grading.

Get Exam Ready with Interactive 0478 Practice

Test your pseudocode against real test cases, dry-run trace tables, and receive instant marks before exam day.

Start 0478 Practice Questions ➔ Download Cheat Sheet PDF ➔