Home / How-To Guides

How-To Guides · 7 min read

IGCSE Computer Science 0478 Paper 2: A Pseudocode and Algorithms Guide

Paper 2 of Cambridge IGCSE Computer Science (0478) is worth 50% of your grade and tests algorithms, programming and logic in 1 hour 45 minutes. To do well you need to read and write Cambridge-style pseudocode, complete trace tables, know the standard algorithms and plan the final 15-mark scenario question. This guide shows the pseudocode you need with examples, and the mistakes that cost students the most marks.

Key takeaways

  • Paper 2 is 75 marks in 1 hour 45 minutes and counts for half of the qualification.
  • It covers topics 7 to 10: algorithm design, programming, databases and Boolean logic.
  • The last question is a 15-mark scenario answered in pseudocode or a programming language from the syllabus.
  • Trace tables, validation and the standard algorithms appear in almost every paper.

What is in Paper 2?

Cognito's summary of the specification describes 0478 as a linear qualification with two written papers of 1 hour 45 minutes, each worth 75 marks and 50%. Paper 1 covers computer systems. Paper 2, Algorithms, Programming and Logic, tests problem-solving with Cambridge pseudocode.

TopicWhat you must be able to do
7. Algorithm design and problem-solvingFlowcharts, pseudocode, trace tables, validation, finding and fixing errors
8. ProgrammingVariables, selection, loops, arrays, procedures, functions, file handling
9. DatabasesFields, records, data types, primary keys, simple SQL queries
10. Boolean logicLogic gates, truth tables, logic expressions and circuits

Tutopiya's review of recent exam trends confirms the structure was unchanged for 2025 and 2026, with pseudocode, algorithms and trace tables at the centre of Paper 2.

What does Cambridge pseudocode look like?

Cambridge pseudocode uses capital letters for keywords and an arrow for assignment. The syllabus contains the official guide, and questions are written in that style, so you must be able to read it even if you answer in Python.

DECLARE Total : INTEGER
DECLARE Mark : INTEGER
Total ← 0
FOR Count ← 1 TO 5
    OUTPUT "Enter mark"
    INPUT Mark
    Total ← Total + Mark
NEXT Count
OUTPUT "Average is ", Total / 5

Notice the pattern: declare variables with a data type, set starting values, use INPUT and OUTPUT for the user, and close every structure. A FOR loop ends with NEXT, an IF ends with ENDIF, and a WHILE ends with ENDWHILE.

Which loop and selection structures do you need?

You need three loops and two kinds of selection. Choosing the right loop is a common one-mark question.

StructureUse it whenEnds with
FOR ... TO ... NEXTYou know how many times to repeatNEXT
WHILE ... DOThe loop may run zero times; condition checked firstENDWHILE
REPEAT ... UNTILThe loop must run at least once; condition checked lastUNTIL condition
IF ... THEN ... ELSETwo or three pathsENDIF
CASE OFMany values of one variableENDCASE
REPEAT
    OUTPUT "Enter a mark from 0 to 100"
    INPUT Mark
UNTIL Mark >= 0 AND Mark <= 100

That example is a range check, the most common validation question. Learn it by heart, along with a length check and a presence check.

How do arrays and standard algorithms work?

Arrays store many values under one name. Cambridge papers use them for the standard algorithms: totalling, counting, finding the maximum and minimum, linear search and bubble sort.

DECLARE Scores : ARRAY[1:30] OF INTEGER
Highest ← Scores[1]
FOR Index ← 2 TO 30
    IF Scores[Index] > Highest
        THEN
            Highest ← Scores[Index]
    ENDIF
NEXT Index
OUTPUT "Highest score is ", Highest

Two details earn marks here. Set the starting value from the first element, not from zero, so the code still works if every score is negative. And loop over the correct range. Two-dimensional arrays work the same way with two indexes and a nested loop.

How do you complete a trace table?

  1. Write one column for every variable and one for OUTPUT, in the order given.
  2. Work through the algorithm one line at a time. Do not jump ahead.
  3. Write a new value only when a variable changes. Leave other cells blank unless the question says otherwise.
  4. Check the loop condition every time, especially on the final pass.
  5. Write outputs exactly, including text and spacing.

Most lost marks come from rushing the last iteration or forgetting that a REPEAT loop runs once before it checks its condition. Use a ruler or your finger on the line you are executing.

How do you answer the 15-mark scenario question?

The final question describes a problem, usually with arrays already named, and asks you to write a complete program. Cambridge's help page on the scenario question confirms that candidates must write their solution in pseudocode or in one of the programming languages named in the syllabus, so do not answer in a language the syllabus does not list.

  1. Read the scenario twice and underline every requirement. Each one is worth marks.
  2. Note the array names and sizes exactly as given. Do not rename them.
  3. Plan in four parts: input with validation, processing, output, and any repeat for all records.
  4. Write clear comments and meaningful variable names. They are credited.
  5. Check that every requirement you underlined appears in your code.

You do not need perfect syntax, but your logic must be complete. A full attempt that handles every requirement scores far more than a tidy answer that stops halfway.

Is the syllabus changing?

The current syllabus covers exams in 2026, 2027 and 2028. Cambridge has already published the syllabus for 2029 to 2031, in which the papers are renamed Computer Systems and Logic (Paper 1) and Algorithms and Programming (Paper 2). If your exams are in 2029 or later, download that version.

Pseudocode is much easier once you can program for real. Build that skill with how to learn Python fast, and schedule past papers with an AI study plan. An AI tutor can also mark your pseudocode if you ask it to check against Cambridge conventions; see how to use ChatGPT study mode.

Frequently asked questions

Can I use Python in IGCSE Computer Science Paper 2?

For the 15-mark scenario question you may answer in pseudocode or a programming language named in the syllabus. You still need to read Cambridge pseudocode, because questions are written in it.

How many marks is IGCSE Computer Science Paper 2?

Paper 2 is worth 75 marks, lasts 1 hour 45 minutes and counts for 50% of the qualification.

What is the difference between WHILE and REPEAT loops?

A WHILE loop checks its condition first, so it may not run at all. A REPEAT UNTIL loop checks at the end, so it always runs at least once.

Sources

Related reading

Keep going

More free, checked guides on AI tools and tech skills

Browse all guides