Skip to content

Subject guides

IGCSE Computer Science 0478 Paper 2: Pseudocode and Trace Table Practice

Program code on a computer screen

By 3 min read

Program code on a computer screen

Reading a solution can make programming feel easier than it is. Paper 2 preparation needs a second step: close the example, identify the inputs and write your own solution. If you get stuck, locate the missing decision or variable before looking back at the whole answer.

Use the correct syllabus-year language rules

The Cambridge 0478 syllabus for 2026–2028 requires pseudocode for coding solutions except in the 15-mark scenario question, where pseudocode, Python, Visual Basic or Java may be used. Do not apply a programming-language rule from a different syllabus period. Learning Python is useful for testing your reasoning, but also practise the notation required in your exam.

Plan inputs, processing and outputs first

Suppose a practice task asks you to input four scores and display their total and how many are at least 50. The inputs are the four scores. You need a running total and a separate count of passing scores. The outputs are those two final values. Initialise both to zero before the loop; resetting either inside the loop would erase earlier results.

  1. List every required input and its data type before writing statements.
  2. Choose meaningful variable names such as Total and PassCount, and set starting values.
  3. Read each score, add it to Total and increase PassCount only when Score is at least 50.
  4. Place the final output after all four scores have been processed.
  5. Dry-run the algorithm with values that test both sides of the condition.

Worked trace table: totals and counting

Use scores 40, 50, 75 and 35. The table below is a learning trace showing the state after each score is processed; in an exam, follow the supplied table's headings and required entries. Notice that a score of exactly 50 passes the condition. Testing only 40 and 75 would not reveal an incorrect greater-than sign.

StepScoreTotalPassCount
Initial stateNot read00
140400
250901
3751652
4352002

The final outputs are 200 and 2. If your trace gives a total of 35, check whether you assigned the latest score to Total instead of adding it. If it counts only one pass, check whether your comparison accidentally excludes 50. These are different bugs and require different corrections.

Separate validation from verification

Validation checks whether data meets an acceptance rule. For a whole-number score from 0 to 100, a range check rejects −1 or 101, while a suitable type check addresses non-integer input. Verification checks whether data has been copied or entered as intended, for example by entering it twice and comparing. A valid score of 70 could still be a mistyped version of 80.

Turn scenario requirements into a checklist

Underline each instruction in the scenario and map it to part of your plan. Check array bounds, whether a search stops at the right point, and what happens if no match is found. Use one permitted language consistently. Comments can clarify your intention, but they should not replace processing steps that the solution needs.

For revision, alternate short tracing exercises with algorithms written from scratch. After marking, rebuild the failed section without copying. Use our past-paper revision routine, or bring an attempted algorithm to an online Computer Science lesson for focused feedback.

Frequently asked questions

01

Can I answer 0478 Paper 2 in Python?

For the 2026–2028 syllabus, coding solutions outside the 15-mark scenario question must use pseudocode. The scenario question permits pseudocode, Python, Visual Basic or Java. Follow the question instructions and your examination-year syllabus.

02

What is a trace table in IGCSE Computer Science?

A trace table records how variables change as an algorithm runs. Work through the statements in order and record outputs only when an output instruction executes.

03

Should I memorise a solution to the scenario question?

Learn reusable skills such as validation, counting, totalling and searching, but practise combining them for unfamiliar requirements. A memorised program can solve the wrong problem when the input or output requirements change.

Keep reading

All articles →
Your next chapter

Ready for your best grades yet?

Book a discounted 45-minute trial class. We'll assess your level, match you with a specialist and share a study plan.

Student joining a live online class on a laptop at home
Quality education.
Anywhere, anytime.
Book a trialWhatsApp