Algorithm Design (GCSE & IGCSE Computer Science): Revision Notes and Worksheets

GCSE and IGCSE Computer Science algorithm design: abstraction, decomposition, structure diagrams, pseudocode, flowcharts, trace tables and fixing errors.

Flowchart that inputs a number of laps, checks it is from 1 to 100, outputs Invalid and loops back to the input if it is not, then calculates the distance as laps times 25 and outputs it.

Before anyone writes a line of code, they plan it: they break the problem down, decide the steps, and check the steps work. This guide covers GCSE and IGCSE algorithm design: abstraction and decomposition, inputs, processes and outputs, structure diagrams, the program development life cycle, pseudocode, flowcharts, turning a problem into an algorithm, trace tables, finding and fixing errors, and explaining what an algorithm does. Each part has a worked example and a worksheet for your exam board.

OCR J277 students: you need every part except K4, and only the points marked GCSE or Both boards. K4, the program development life cycle, is on the Cambridge IGCSE 0478 syllabus only. Cambridge IGCSE 0478 students: you need every part, without the GCSE-only points. There is no part K2.

What does algorithm design cover for OCR and Cambridge?

An algorithm is a precise sequence of steps that solves a problem. Algorithm design is the start of Paper 2 for both boards: OCR J277/02 (2.1.1 and 2.1.2) and Cambridge 0478 Paper 2 (topic 7, plus the flowchart symbols and pseudocode in section 4). The two boards teach the same skills, but each writes code its own way: OCR uses its Exam Reference Language, Cambridge uses its own pseudocode. The table below is based on the OCR J277 specification (version 3.1) and the Cambridge IGCSE 0478 syllabus for 2026-2028, as checked in November 2026. Searching and sorting are in Module L; validation and test data are in Module O.

Part

Topic

OCR J277

Cambridge 0478

K1

Computational thinking and inputs, processes, outputs (both boards)

2.1.1, 2.1.2

7.1 (analysis), 7.2(a), 7.2(b)

K3

Structure diagrams (both boards)

2.1.2

7.2(c)

K4

Program development life cycle (IGCSE only)

not on specification

7.1

K5

Pseudocode (both boards)

2.1.2

7.9, section 4

K6

Flowcharts (both boards)

2.1.2

7.9, section 4

K7

Turning a problem into an algorithm (both boards)

2.1.2

7.2(c), 7.9

K8

Trace tables (both boards)

2.1.2

7.7

K9

Finding and fixing errors (both boards)

2.1.2

7.8

K10

Explaining what an algorithm does (both boards)

2.1.2

7.3

K1: What are abstraction, decomposition and inputs, processes and outputs?

Both boards. Decomposition is breaking a complex problem down into smaller, more manageable sub-problems. Each part is easier to solve, can be tested separately, can be shared between the people in a team, and can be reused.

Abstraction is removing unnecessary detail so you can focus on what is important for solving the problem. A metro map is an abstraction: it shows the stations, the lines and where to change, but leaves out distances, streets and buildings.

Every problem has inputs (the data entered into the system), processes (what is done to the data, such as calculations and checks) and outputs (the results produced). You must be able to identify them for a given problem.

GCSE only: OCR J277 calls abstraction, decomposition and algorithmic thinking the principles of computational thinking, used to define and refine a problem. Algorithmic thinking is identifying the steps needed, in the right order, to solve the problem.

IGCSE only: Cambridge 0478 decomposes a problem into inputs, processes, outputs and storage (the data that must be kept). It also says that every computer system is made up of sub-systems, which are made up of further sub-systems. Abstraction and decomposition happen in the analysis stage of the program development life cycle (K4).

Worked example: decompose a car park system (both boards)

A car park's camera reads each car's number plate as it enters and leaves. When a car leaves, the system works out how long it stayed and the charge, shows the charge on a screen, and opens the barrier once the driver has paid.

  • Step 1 (both boards): inputs: the number plate read by the camera; the payment.

  • Step 2 (both boards): processes: calculate the time parked (exit time minus entry time); calculate the charge; check the payment has been made.

  • Step 3 (both boards): outputs: the charge shown on the screen; the signal that opens the barrier.

  • Step 4 (IGCSE only): storage: each number plate with its entry time, so the time parked can be worked out when the car leaves.

Practise K1: OCR questions · OCR mark scheme · Cambridge questions · Cambridge mark scheme

K3: What is a structure diagram?

Both boards. A structure diagram is a hierarchical (top-down) diagram that shows how a problem is broken down into smaller parts. The top box is the whole problem. Each level below splits a box into its sub-problems, so the diagram shows the structure of the problem, its subsections and how they link. The lowest boxes are small enough to become a single module or sub program.

A structure diagram is the picture you get from decomposition. It does not show decisions, loops or arrows: that is the job of a flowchart (K6).

IGCSE only: in Cambridge words, the diagram shows how a system is made up of sub-systems, which are made up of further sub-systems. Structure diagrams are used in the design stage of the program development life cycle (K4).

Structure diagram for a self-service library kiosk: the top box, Borrow books, splits into Identify member, Issue books and Finish, and each of these splits into two smaller sub-problems.

Worked example: draw a structure diagram (both boards)

A library's self-service kiosk lets a member borrow books.

  • Step 1: write the whole problem in the top box: Borrow books.

  • Step 2: split it into the main sub-problems, left to right: Identify member, Issue books, Finish.

  • Step 3: split each box again until each one is a single task: Identify member becomes Scan membership card and Check membership; Issue books becomes Scan each book and Set return date; Finish becomes Print receipt and Save loan records.

  • Step 4: check it: every box is a sub-problem of the box above it, and there are no decision diamonds.

Practise K3: OCR questions · OCR mark scheme · Cambridge questions · Cambridge mark scheme

K4: What is the program development life cycle?

IGCSE only. OCR J277 has no program development life cycle, so OCR students can skip this part (the nearest OCR content is iterative and final testing, in Module O). Cambridge 0478 limits the program development life cycle to four stages, in this order:

  • Analysis: identification of the problem and its requirements, using abstraction and decomposition of the problem.

  • Design: planning the solution with decomposition, structure diagrams, flowcharts and pseudocode.

  • Coding: writing the program code, with iterative testing: each module is tested as it is written, errors are corrected, and it is tested again.

  • Testing: testing the program code with test data (normal, abnormal, extreme and boundary) and comparing the actual results with the expected results.

Worked example: which stage? (IGCSE only)

A programmer writes a booking program for a hairdresser.

  • Step 1: the programmer asks the owner what the program must do, and decides that the music played in the salon is not needed: analysis (requirements and abstraction).

  • Step 2: the programmer draws a structure diagram and writes the steps in pseudocode: design.

  • Step 3: the programmer writes the module that works out the price and tests it before starting the next module: coding, with iterative testing.

  • Step 4: the finished program is run with an appointment length of 0 minutes, to check that it is rejected: testing.

Practise K4: Cambridge questions · Cambridge mark scheme

K5: How do you read and write pseudocode?

Both boards. Pseudocode is a structured, code-like way of writing an algorithm that is not tied to one programming language. It is used to plan the logic of a program before coding, and it is easy to turn into real code. You must be able to read it and to write, complete, correct and refine it.

  • Precision: write conditions as code, such as score > 50, not in English ("the score is more than 50").

  • Layout: indent the contents of IF statements, loops and sub programs, and use meaningful identifiers.

  • Comments start with // on both boards.

GCSE only: code in OCR exams is printed in OCR Exam Reference Language: x = 3, name = input("Name"), print(x), if ... then ... endif, for i = 0 to 9 ... next i. In Section A you can answer in any form, such as pseudocode, a flowchart or a programming language. In Section B, questions that ask you to write or refine code need OCR Exam Reference Language or a high-level language: answers in pseudocode, English or bullet points get no marks there. Minor syntax errors are not penalised.

IGCSE only: Cambridge uses its own pseudocode: DECLARE Count : INTEGER, Count ← 0, INPUT Name, OUTPUT Count, IF ... THEN ... ENDIF. Keywords are in upper case; identifiers are in mixed case, such as NumberOfPlayers; lines inside a statement are indented 4 spaces (THEN and ELSE only 2). Paper 2 coding answers must be in pseudocode: program code gets no marks, except in the 15-mark scenario question, which accepts pseudocode, Python, Visual Basic or Java.

Worked example: the same algorithm on both boards

A goods lift records the weight of 4 loads. It outputs the total weight and how many loads were over 600 kg.

OCR Exam Reference Language (GCSE):

total = 0
heavy = 0
for load = 1 to 4
    weight = int(input("Enter weight in kg"))
    total = total + weight
    if weight > 600 then
        heavy = heavy + 1
    endif
next load
print("Total: " + str(total))
print("Over 600 kg: " + str(heavy))
total = 0
heavy = 0
for load = 1 to 4
    weight = int(input("Enter weight in kg"))
    total = total + weight
    if weight > 600 then
        heavy = heavy + 1
    endif
next load
print("Total: " + str(total))
print("Over 600 kg: " + str(heavy))
total = 0
heavy = 0
for load = 1 to 4
    weight = int(input("Enter weight in kg"))
    total = total + weight
    if weight > 600 then
        heavy = heavy + 1
    endif
next load
print("Total: " + str(total))
print("Over 600 kg: " + str(heavy))

Cambridge pseudocode (IGCSE):

Total ← 0
Heavy ← 0
FOR Load ← 1 TO 4
    OUTPUT "Enter weight in kg"
    INPUT Weight
    Total ← Total + Weight
    IF Weight > 600
      THEN
        Heavy ← Heavy + 1
    ENDIF
NEXT Load
OUTPUT "Total: ", Total
OUTPUT "Over 600 kg: ", Heavy
Total ← 0
Heavy ← 0
FOR Load ← 1 TO 4
    OUTPUT "Enter weight in kg"
    INPUT Weight
    Total ← Total + Weight
    IF Weight > 600
      THEN
        Heavy ← Heavy + 1
    ENDIF
NEXT Load
OUTPUT "Total: ", Total
OUTPUT "Over 600 kg: ", Heavy
Total ← 0
Heavy ← 0
FOR Load ← 1 TO 4
    OUTPUT "Enter weight in kg"
    INPUT Weight
    Total ← Total + Weight
    IF Weight > 600
      THEN
        Heavy ← Heavy + 1
    ENDIF
NEXT Load
OUTPUT "Total: ", Total
OUTPUT "Over 600 kg: ", Heavy
  • Step 1 (both boards): "over 600 kg" becomes > 600, not >= 600: a load of exactly 600 kg is not over.

  • Step 2 (both boards): for the loads 450, 620, 600 and 700, the total is 2370 and 2 loads are over 600 kg.

  • Step 3: spot the differences: OCR assigns with = and joins text with + and str(); Cambridge assigns with ←, writes keywords in capitals, and separates output items with commas.

Practise K5: OCR questions · OCR mark scheme · Cambridge questions · Cambridge mark scheme

K6: What are the flowchart symbols and how do you read a flowchart?

Both boards. A flowchart is a diagram of an algorithm drawn with standard symbols joined by arrows. Both boards use the same six symbols; only some of the names differ. You must be able to read, trace, complete, correct and draw flowcharts.

Symbol

OCR J277 name (GCSE)

Cambridge 0478 name (IGCSE)

What it shows

Rounded rectangle

Terminal

Terminator

The Start and the end (Stop) of the algorithm

Rectangle

Process

Process

Something being done, such as a calculation or assignment

Parallelogram

Input/Output

Input/Output

Data going in or coming out, such as input a name or output a total

Diamond

Decision

Decision

A Yes/No (True/False) question with two exit lines

Rectangle with double sides

Sub program

Subroutine

A call to a separate flowchart

Arrow

Line

Flow line

Control passing from one symbol to the next

An arrow that goes back to an earlier symbol makes a loop. A decision is used for selection and for deciding when a loop stops.

IGCSE only: Cambridge says these symbols must be used, and the subroutine symbol relates to a separate, non-linked flowchart. Cambridge flowcharts write statements in pseudocode, such as Total ← Total + Price.

GCSE only: OCR flowcharts write statements in the style of OCR Exam Reference Language, such as total = total + price.

The six flowchart symbols with their OCR and Cambridge names: terminal or terminator, process, input/output, decision, sub program or subroutine, and line or flow line.

Worked example: draw a flowchart with a validation loop (both boards)

A swimming pool's app inputs the number of 25-metre lengths swum. The number must be from 1 to 100; if it is not, the app outputs "Invalid" and asks again. It then outputs the distance in metres.

  • Step 1: a terminator (terminal) for START, then an input parallelogram: INPUT Laps.

  • Step 2: a decision diamond: is Laps >= 1 AND Laps <= 100? Label both exits. No: an output parallelogram for "Invalid", with a flow line back to the input (the loop).

  • Step 3: Yes: a process rectangle, Distance ← Laps * 25 (OCR style: distance = laps * 25), then an output parallelogram for Distance, then STOP.

  • Step 4: trace it: inputs 0 then 40 give the output "Invalid", then 1000.

Practise K6: OCR questions · OCR mark scheme · Cambridge questions · Cambridge mark scheme

K7: How do you turn a problem into an algorithm?

Both boards. The method is the same on both boards:

  • Identify the inputs, processes and outputs (IGCSE only: and the data that must be stored).

  • Decompose the task into steps and put them in the right order (sequence).

  • Decide where decisions (selection) and repetition (iteration) are needed.

  • Choose the variables, with meaningful names and starting values, such as a total that starts at 0.

  • Write it as pseudocode or a flowchart. (GCSE only: Section B write questions need OCR Exam Reference Language or a high-level language. IGCSE only: Paper 2 coding answers must be in Cambridge pseudocode, except the 15-mark question.)

  • Refine it, for example by adding validation or handling an edge case, then dry-run it with test values (K8).

Worked example: loyalty points (both boards)

A cinema gives 10 points for each ticket bought, plus a bonus of 25 points when 4 or more tickets are bought at once. The algorithm inputs the number of tickets and outputs the points.

  • Step 1: input: the number of tickets; process: multiply the tickets by 10, then add 25 if there are 4 or more tickets; output: the points.

  • Step 2: "4 or more" needs selection, and the condition is >= 4. No loop is needed for one booking.

  • Step 3: write it.

OCR Exam Reference Language (GCSE):

tickets = int(input("Enter number of tickets"))
points = tickets * 10
if tickets >= 4 then
    points = points + 25
endif
print(points)
tickets = int(input("Enter number of tickets"))
points = tickets * 10
if tickets >= 4 then
    points = points + 25
endif
print(points)
tickets = int(input("Enter number of tickets"))
points = tickets * 10
if tickets >= 4 then
    points = points + 25
endif
print(points)

Cambridge pseudocode (IGCSE):

OUTPUT "Enter number of tickets"
INPUT Tickets
Points ← Tickets * 10
IF Tickets >= 4
  THEN
    Points ← Points + 25
ENDIF
OUTPUT Points
OUTPUT "Enter number of tickets"
INPUT Tickets
Points ← Tickets * 10
IF Tickets >= 4
  THEN
    Points ← Points + 25
ENDIF
OUTPUT Points
OUTPUT "Enter number of tickets"
INPUT Tickets
Points ← Tickets * 10
IF Tickets >= 4
  THEN
    Points ← Points + 25
ENDIF
OUTPUT Points
  • Step 4: dry-run it on each side of the condition: 3 tickets give 30 points; 4 tickets give 40 + 25 = 65 points.

Practise K7: OCR questions · OCR mark scheme · Cambridge questions · Cambridge mark scheme

K8: How do you complete a trace table?

Both boards. A dry run is working through an algorithm by hand, step by step, without a computer. A trace table records the value of each variable as it changes while the algorithm runs: one column per variable, plus a column for the output, and a new row each time a value changes. Trace tables are used to check an algorithm works, to find logic errors and to work out what an algorithm does. In a loop, update the counter, test the condition again on every pass, and record when the loop ends.

GCSE only: OCR asks you to create and use trace tables. OCR tables often have a Line column, and you may have to write your own column headings. Leave the Output cell blank when nothing is output.

IGCSE only: Cambridge trace tables record, at each step, the variables, the outputs and the user prompts, so a prompt such as "Enter start" goes in the OUTPUT column. There is no line-number column.

Worked example: trace a loop (both boards)

This algorithm doubles a number until it is over 50 and counts the doublings. The input is 7.

OCR Exam Reference Language (GCSE):

01 n = int(input("Enter start"))
02 steps = 0
03 while n <= 50
04     n = n * 2
05     steps = steps + 1
06 endwhile
07 print(steps)
01 n = int(input("Enter start"))
02 steps = 0
03 while n <= 50
04     n = n * 2
05     steps = steps + 1
06 endwhile
07 print(steps)
01 n = int(input("Enter start"))
02 steps = 0
03 while n <= 50
04     n = n * 2
05     steps = steps + 1
06 endwhile
07 print(steps)

Cambridge pseudocode (IGCSE):

01 OUTPUT "Enter start"
02 INPUT N
03 Steps ← 0
04 WHILE N <= 50 DO
05     N ← N * 2
06     Steps ← Steps + 1
07 ENDWHILE
08 OUTPUT Steps
01 OUTPUT "Enter start"
02 INPUT N
03 Steps ← 0
04 WHILE N <= 50 DO
05     N ← N * 2
06     Steps ← Steps + 1
07 ENDWHILE
08 OUTPUT Steps
01 OUTPUT "Enter start"
02 INPUT N
03 Steps ← 0
04 WHILE N <= 50 DO
05     N ← N * 2
06     Steps ← Steps + 1
07 ENDWHILE
08 OUTPUT Steps

n

steps

Output

7

0

14

1

28

2

56

3

3

  • Step 1: 7 is input and steps starts at 0. (IGCSE only: the first OUTPUT entry is the prompt, Enter start.)

  • Step 2: 7 <= 50 is true, so n doubles to 14 and steps becomes 1; 14 <= 50, so 28 and 2; 28 <= 50, so 56 and 3.

  • Step 3: 56 <= 50 is false, so the loop ends and the output is 3.

Practise K8: OCR questions · OCR mark scheme · Cambridge questions · Cambridge mark scheme

K9: How do you find and fix errors in an algorithm?

Both boards. You will be given an algorithm (pseudocode, code or a flowchart) that does not do what it should. For each error, give the line number, what is wrong and the corrected line. Common errors:

  • the wrong comparison, such as < instead of <=, or > instead of <;

  • the wrong loop start or end value (one pass too many or too few);

  • a variable not set to its starting value, or reset inside a loop (a total not set to 0);

  • the wrong variable used, or a statement inside the loop that should be outside it (or the other way round);

  • a counter that is never updated, so the loop never ends.

Use a trace table or test data to find where the output first goes wrong.

GCSE only: OCR J277 names two types of error. A syntax error breaks the grammatical rules of the language, so the program will not run. A logic error lets the program run but produces unexpected output. Write corrections in OCR Exam Reference Language, such as ==, !=, endif and next i.

IGCSE only: write corrections in Cambridge pseudocode, such as ←, =, <>, ENDIF and NEXT Index.

Worked example: three errors (both boards)

This algorithm should count how many of 6 parcels weigh 2 kg or more.

OCR Exam Reference Language (GCSE):

01 heavy = 1
02 for p = 1 to 5
03     w = float(input("Enter weight in kg"))
04     if w > 2 then
05         heavy = heavy + 1
06     endif
07 next p
08 print(heavy)
01 heavy = 1
02 for p = 1 to 5
03     w = float(input("Enter weight in kg"))
04     if w > 2 then
05         heavy = heavy + 1
06     endif
07 next p
08 print(heavy)
01 heavy = 1
02 for p = 1 to 5
03     w = float(input("Enter weight in kg"))
04     if w > 2 then
05         heavy = heavy + 1
06     endif
07 next p
08 print(heavy)

Cambridge pseudocode (IGCSE):

01 Heavy ← 1
02 FOR P ← 1 TO 5
03     INPUT W
04     IF W > 2.0
05       THEN
06         Heavy ← Heavy + 1
07     ENDIF
08 NEXT P
09 OUTPUT Heavy
01 Heavy ← 1
02 FOR P ← 1 TO 5
03     INPUT W
04     IF W > 2.0
05       THEN
06         Heavy ← Heavy + 1
07     ENDIF
08 NEXT P
09 OUTPUT Heavy
01 Heavy ← 1
02 FOR P ← 1 TO 5
03     INPUT W
04     IF W > 2.0
05       THEN
06         Heavy ← Heavy + 1
07     ENDIF
08 NEXT P
09 OUTPUT Heavy
  • Step 1: test it with 2.0, 1.5, 3.2, 0.8, 2.0 and 4.1. The right answer is 4, but the algorithm outputs 2.

  • Step 2: line 01: the count must start at 0. OCR: heavy = 0 · Cambridge: Heavy ← 0.

  • Step 3: line 02: the loop runs only 5 times. OCR: for p = 1 to 6 · Cambridge: FOR P ← 1 TO 6.

  • Step 4: line 04: "2 kg or more" includes 2. OCR: if w >= 2 then · Cambridge: IF W >= 2.0.

Practise K9: OCR questions · OCR mark scheme · Cambridge questions · Cambridge mark scheme

K10: How do you explain what an algorithm does?

Both boards. To interpret an algorithm, dry-run it with sample data, then explain it:

  • State the purpose: one sentence on the overall result, such as "outputs the highest of 10 numbers entered".

  • Describe the processes: the inputs, what is calculated, checked or repeated, and what is output.

  • Recognise common patterns: totalling (total = total + x), counting (count = count + 1), finding the maximum or minimum, searching, sorting and input validation loops.

  • Refer to the actual variables and values, not general statements. Identifiers and comments are clues, but confirm the purpose by tracing.

IGCSE only: Cambridge 0478 (7.3) asks you to state the purpose of a given algorithm and describe the processes involved. Its standard methods of solution (7.4) are linear search, bubble sort, totalling, counting, and finding maximum, minimum and average values.

GCSE only: OCR J277 also asks you to identify a standard searching or sorting algorithm from code: binary search, linear search, bubble sort, merge sort or insertion sort (2.1.3, in Module L).

Worked example: state the purpose (both boards)

OCR Exam Reference Language (GCSE):

inRange = 0
for i = 1 to 8
    reading = int(input("Enter reading"))
    if reading >= 20 AND reading <= 25 then
        inRange = inRange + 1
    endif
next i
print(inRange / 8 * 100)
inRange = 0
for i = 1 to 8
    reading = int(input("Enter reading"))
    if reading >= 20 AND reading <= 25 then
        inRange = inRange + 1
    endif
next i
print(inRange / 8 * 100)
inRange = 0
for i = 1 to 8
    reading = int(input("Enter reading"))
    if reading >= 20 AND reading <= 25 then
        inRange = inRange + 1
    endif
next i
print(inRange / 8 * 100)

Cambridge pseudocode (IGCSE):

InRange ← 0
FOR Index ← 1 TO 8
    INPUT Reading
    IF (Reading >= 20) AND (Reading <= 25)
      THEN
        InRange ← InRange + 1
    ENDIF
NEXT Index
OUTPUT InRange / 8 * 100
InRange ← 0
FOR Index ← 1 TO 8
    INPUT Reading
    IF (Reading >= 20) AND (Reading <= 25)
      THEN
        InRange ← InRange + 1
    ENDIF
NEXT Index
OUTPUT InRange / 8 * 100
InRange ← 0
FOR Index ← 1 TO 8
    INPUT Reading
    IF (Reading >= 20) AND (Reading <= 25)
      THEN
        InRange ← InRange + 1
    ENDIF
NEXT Index
OUTPUT InRange / 8 * 100
  • Step 1: dry-run it with 19, 22, 25, 30, 21, 18, 20, 26. The readings 22, 25, 21 and 20 are counted, so the count is 4 and the output is 4 ÷ 8 × 100 = 50.

  • Step 2: spot the patterns: a count-controlled loop that runs 8 times, with counting inside a selection.

  • Step 3: state the purpose: it outputs the percentage of the 8 readings that are from 20 to 25 inclusive.

  • Step 4: describe the processes, using the variables: the count starts at 0; 8 readings are input; each reading from 20 to 25 adds 1 to the count; at the end the count is divided by 8 and multiplied by 100.

Practise K10: OCR questions · OCR mark scheme · Cambridge questions · Cambridge mark scheme

Common exam mistakes in algorithm design

  • Writing conditions in English ("if the score is more than 50"). Write them as code: score > 50.

  • Leaving the variable out of the second half of a condition: x >= 1 AND <= 100 is wrong; write x >= 1 AND x <= 100.

  • Using > when the question says "or more" or "at least": that needs >=.

  • Drawing a structure diagram with decisions and arrows like a flowchart. A structure diagram only shows the problem split into sub-problems.

  • Flowcharts: using a rectangle for an input or output (it is a parallelogram), or leaving the two exits of a decision without Yes/No labels.

  • Trace tables: skipping a pass of the loop, or carrying on after the loop condition has stopped it. (IGCSE) Forgetting to record the user prompts in the OUTPUT column.

  • Explaining an algorithm line by line ("line 2 is a for loop") instead of stating its purpose with its actual variables and values.

  • (GCSE) Answering a Section B "write" question in English or bullet points. It needs OCR Exam Reference Language or a high-level language.

  • (IGCSE) Writing program code instead of pseudocode outside the 15-mark question, or naming "implementation" as a stage of the program development life cycle.

Quick recap

  • K1: decomposition splits a problem into sub-problems; abstraction removes unnecessary detail; identify inputs, processes and outputs; algorithmic thinking GCSE only; storage and sub-systems IGCSE only.

  • K3: a structure diagram is a top-down diagram of a problem split into sub-problems; the top box is the whole problem.

  • K4: (IGCSE only) the program development life cycle: analysis, design, coding (with iterative testing), testing.

  • K5: pseudocode is code-like and not tied to one language; write precise conditions; OCR Exam Reference Language GCSE only; Cambridge pseudocode with ← IGCSE only.

  • K6: six flowchart symbols: terminal/terminator, process, input/output, decision, sub program/subroutine, line/flow line.

  • K7: inputs, processes, outputs; sequence, selection, iteration; variables with starting values; write it, refine it, dry-run it.

  • K8: a trace table records each variable as it changes; a new row for each change; IGCSE also records outputs and user prompts.

  • K9: give the line number, the error and the corrected line; syntax and logic errors GCSE only.

  • K10: dry-run, then state the purpose and describe the processes, using the actual variables.

Download the whole module

Frequently asked questions

Is the program development life cycle on the OCR GCSE J277 specification?

No. The program development life cycle (analysis, design, coding and testing) is on the Cambridge IGCSE 0478 syllabus only. OCR J277 students meet iterative and final testing instead, in the topic on producing robust programs.

What is the difference between abstraction and decomposition?

Abstraction is removing unnecessary detail so you can focus on what is important for solving a problem. Decomposition is breaking a complex problem down into smaller, more manageable sub-problems.

What is the difference between a structure diagram and a flowchart?

A structure diagram is a top-down diagram that shows how a problem is broken down into sub-problems. A flowchart shows the steps of an algorithm in order, with standard symbols for inputs, outputs, processes and decisions, and arrows that can make loops.

What are the flowchart symbols for GCSE and IGCSE Computer Science?

There are six: the terminal or terminator (Start and Stop), the process rectangle, the input/output parallelogram, the decision diamond, the sub program or subroutine box with double sides, and the line or flow line arrow. OCR and Cambridge use the same shapes; only some of the names differ.

How do you complete a trace table?

Work through the algorithm by hand, one step at a time. Start a new row each time a variable changes, test the loop condition on every pass, and record each output. For Cambridge IGCSE, also record the user prompts in the OUTPUT column.

What is the difference between a syntax error and a logic error?

A syntax error breaks the grammatical rules of the programming language, so the program will not run. A logic error lets the program run but produces unexpected output. OCR J277 names both types; Cambridge 0478 asks you to find and correct errors in an algorithm.

Previous module: Hardware and emerging tech revision notes.

More help: browse the GCSE Computer Science revision hub.