How to Prepare for A-Level Computer Science Programming Questions: Writing Pseudocode for Cambridge 9618 Paper 2 and Submitting Practical Evidence for Paper 4
Cambridge 9618 Paper 2 is a written pseudocode exam, and Paper 4 is a computer-based exam where students write complete programs; each accounts for 25% of the A-Level grade. Based on the 9618 syllabus and the official Pseudocode Guide, this article explains the scope of both papers, pseudocode formatting rules, common question types, and the requirements and preparation methods for the Paper 4 evidence document.
Cambridge A-Level Computer Science (9618) has two programming papers with completely different formats: Paper 2 at the AS level is a written exam answered in pseudocode, without writing actual program code; Paper 4 at the A Level is a computer-based exam where you write complete programs in Java, Visual Basic, or Python. Many students are proficient in Python but lose marks in Paper 2 due to non-standard pseudocode formatting; others write excellent pseudocode but fail to score in the practical exam because they didn't paste their code and execution results into the evidence document. This article explains how to prepare for both papers based on the Cambridge 9618 syllabus (2027–2029) and the official Pseudocode Guide. For the overall structure, see How A-Level Computer Science is Assessed. Pearson Edexcel IAL does not offer Computer Science (see Article 170).
I. The Two Programming Papers
| Paper 2 Fundamental Problem-solving and Programming Skills (AS) | Paper 4 Practical (A Level) | |
|---|---|---|
| Duration, Marks | 2 hours, 75 marks | 2 hours 30 minutes, 75 marks |
| Weighting | 50% of AS, 25% of A Level | 25% of A Level |
| Format | Written exam, answered in pseudocode; a reference sheet with built-in functions and operators is provided | Taken on a school-provided computer with no internet or email access; submit complete program code and testing evidence |
| Content | Sections 9–12 of the syllabus | Sections 19–20 of the syllabus (excluding low-level languages and declarative programming) |
| Assessment Objectives | AO2 Application 40%, AO3 Design, Programming, and Evaluation 60% | AO3 100% |
The official definition of AO3 is: design, write, and evaluate computer systems to solve problems, and make reasoned judgments about them. Paper 4 tests this objective exclusively. Additionally, calculators are not allowed in any 9618 papers (see Article 170).
II. What Does Paper 2 Cover?
- Section 9 Algorithm Design and Problem-solving: Computational thinking (abstraction, decomposition); express algorithms using structured English, flowcharts, and pseudocode, and convert between them;
- Section 10 Data Types and Structures: Data types and records; 1D and 2D arrays, including bubble sort; text files; introduction to abstract data types (stacks, queues, linked lists—the syllabus notes that pseudocode for these three structures is not required);
- Section 11 Programming: Programming fundamentals, three basic constructs (sequence, selection, iteration), built-in functions and library routines, structured programming (procedures, functions, parameters);
- Section 12 Software Development: Development life cycles (waterfall, iterative, rapid application development); structure charts, state transition diagrams; error types (syntax, logic, runtime); testing methods (dry run, walkthrough, white box, black box, integration, alpha, beta, acceptance, stub testing); test data (normal, abnormal, extreme/boundary); maintenance types (perfective, adaptive, corrective).
III. Pseudocode Must Follow the Official Guide
Cambridge has published a public Pseudocode Guide (2027–2029) for 9618, and all pseudocode in the exam must follow its conventions. Here are the most basic rules:
- Keywords in uppercase: IF, REPEAT, PROCEDURE, etc.; identifiers use mixed case, e.g., NumberOfPlayers; identifiers can only contain letters, numbers, and underscores, must start with a letter, and are case-insensitive;
- Indentation: Usually indented by three spaces to indicate that a statement belongs to the structure on the previous line;
- Comments: Start with //;
- Declarations: DECLARE Counter : INTEGER; constants use CONSTANT HourlyRate = 6.50, and constants can only be literals;
- Assignment uses the arrow ←, not the equals sign;
- Data types: INTEGER, REAL, CHAR, STRING, BOOLEAN, DATE; REAL literals must have at least one digit on both sides of the decimal point, e.g., 4.0; CHAR uses single quotes, STRING uses double quotes;
- Arrays: DECLARE StudentNames : ARRAY[1:30] OF STRING; 2D arrays are written as ARRAY[1:3,1:3]; the guide states that the lower bound is generally 1; you cannot write StudentNames[1 TO 30] ← "" to process a group of elements at once; you must use a loop to assign values one by one;
- Selection: IF … THEN … ELSE … ENDIF; CASE OF … OTHERWISE … ENDCASE, with OTHERWISE placed at the end;
- Iteration: FOR … TO … STEP … NEXT (the loop variable must be INTEGER, and the guide recommends repeating the variable name after NEXT); REPEAT … UNTIL (execute first, then check condition); WHILE … ENDWHILE (check condition first, then execute);
- Procedures and functions: Procedures are defined with PROCEDURE … ENDPROCEDURE and called with CALL; functions are defined with FUNCTION … RETURNS data type … ENDFUNCTION and return values with RETURN; unless otherwise specified, parameters are passed by value by default; pass by reference requires BYREF.
Below is an example written in the guide's format (written by us to demonstrate the format): calculate the average of all positive numbers in an array.
DECLARE Values : ARRAY[1:100] OF INTEGER
// Returns the average of all positive numbers among the first Size elements of Values; returns 0 if there are no positive numbers
FUNCTION AveragePositive(Size : INTEGER) RETURNS REAL
DECLARE Total : INTEGER
DECLARE Count : INTEGER
DECLARE Index : INTEGER
Total ← 0
Count ← 0
FOR Index ← 1 TO Size
IF Values[Index] > 0 THEN
Total ← Total + Values[Index]
Count ← Count + 1
ENDIF
NEXT Index
IF Count = 0 THEN
RETURN 0.0
ELSE
RETURN Total / Count
ENDIF
ENDFUNCTION
When practicing, pay attention to the following (empirical advice): declare variables first, use ← for assignment, include the corresponding end keyword for each construct (ENDIF, NEXT, ENDFUNCTION), and handle edge cases like "no data." The guide specifies that division using / results in a REAL type, even if both operands are integers; use DIV for integer division and MOD for the remainder.
IV. Common Question Types in Paper 2 (Empirical Summary)
- Write an algorithm: write a complete procedure or function based on the problem description; figure out the input, processing, and output before writing;
- Complete or modify an algorithm: the question provides partial pseudocode and asks you to fill in the blanks or add features; first understand the meaning of the variables in the existing code;
- Find and fix errors: identify and correct syntax, logic, or runtime errors; check loop boundaries, conditions, and initial variable values line by line;
- Trace table: execute the algorithm step by step with the given data and record variable changes; go step by step and do not skip steps;
- Convert between structure charts, flowcharts, and pseudocode;
- Testing: design normal, abnormal, and boundary test data for a given program and explain the testing methods.
V. What Does Paper 4 Cover?
- Part 19 Computational Thinking and Problem Solving: Linear search and binary search (including conditions for using binary search and its performance); insertion sort and bubble sort; abstract data types: searching in linked lists and binary trees, inserting into stacks, queues, linked lists, and binary trees, and deleting from stacks, queues, and linked lists; expressing time and space complexity using Big O notation; recursion (writing and tracing recursive algorithms);
- Part 20 Further Programming: Procedural programming; object-oriented programming (classes, objects, attributes, methods, inheritance, polymorphism, encapsulation, getters and setters, etc.; designing appropriate classes and writing code); file handling (opening and closing files in read, write, and append modes; reading and writing records); exception handling (knowing when to use it and writing the code for it).
The syllabus states that programming tasks are based on a few scenarios, testing your ability to write programs or code snippets to complete them. Paper 4 does not test low-level languages or declarative programming, and no binary files will be included in the provided source files.
6. Paper 4 Evidence Document: Where You Are Most Likely to Lose Marks
The syllabus has clear rules for submission:
- Cambridge will provide an evidence document, which must be saved using the center number, candidate name, and candidate number;
- At each stage of the exam, you will be required to copy your program code into it or paste in screenshots of the output;
- Save it regularly; the syllabus recommends that centers enable auto-save;
- If there is no evidence of work in the evidence document, you will receive no marks for this section.
In other words, no matter how well you write your program, if you don't paste it into the evidence document as required, it counts as if you didn't write it at all. Here is some practical advice for practice:
- After finishing each sub-question, immediately paste the code and output screenshots into the document. Don't leave it until the end;
- Make sure the screenshots clearly show the input and output, matching the test data required by the question;
- Even if your program doesn't run completely, paste the code you have written. You may still earn partial credit.
7. How to Prepare
Here is some practical advice.
Paper 2
- Read the official Pseudocode Guide thoroughly: This is the most direct reference for formatting and is freely available;
- Practice handwriting: Since the exam is written on paper, practice handwriting your pseudocode. Pay close attention to indentation and end keywords;
- Practice trace tables: Trace tables for loops and arrays are the most error-prone, so practice them often;
- "Translate" familiar languages into pseudocode: Rewrite programs you've written in Python into pseudocode. Remember that array indices start at 1 and assignment uses ←.
Paper 4
- Choose a language early: The syllabus allows Java, Visual Basic (.NET version only; VB 6.0 or earlier is not allowed), or Python, all in console mode. Once your school selects one, stick with it;
- Work through the syllabus checklist: Search, sort, stacks, queues, linked lists, binary trees, recursion, classes and inheritance, file I/O, and exception handling. Code and test each one yourself;
- Practice offline: No internet access is allowed in the exam room. Practice offline in your daily routine and debug on your own without search engines or AI tools;
- Simulate the evidence document: During practice, simulate exam conditions by pasting your code and screenshots into the document;
- Manage your time: You have 2 hours and 30 minutes. Tackle the questions you can score on first, and skip the ones you get stuck on.
Finally
For A Level Computer Science programming, Paper 2 tests expressing algorithms in standard pseudocode, while Paper 4 tests writing fully functional programs on a computer without internet access and documenting the evidence. For the former, practice your formatting against the official Pseudocode Guide. For the latter, work through the syllabus checklist and practice using the evidence document. Each paper accounts for a quarter of the A Level grade, so both are worth preparing for early. If you need A Level Computer Science programming tutoring, feel free to chat with our teachers.
Verification note: This article was verified in September 2026. The duration, marks, weighting, format, scope, objectives and weighting, programming language requirements, computer environment, and evidence document submission requirements for Paper 2 and Paper 4, as well as the content of Parts 9–12 and 19–20, are from the Cambridge International Computer Science 9618 syllabus for 2027, 2028 and 2029. The formatting rules for pseudocode are from the Cambridge International Pseudocode Guide for Teachers (2027–2029 edition, 1st edition). The ban on calculators, the fact that the 2026 syllabus has no major changes affecting teaching compared to the new version, and that Pearson does not offer IAL Computer Science, have been verified in our 170th article. The pseudocode examples in this article are written by us according to the guide's format and are not actual exam questions. Common question types, practice methods, and time suggestions are our practical advice.
References: