Skip to content
2210 · 0478Paper 2 · Algorithms, Programming and Logic

7. Algorithm Design and Problem-Solving

Program development life cycle, decomposition, flowcharts and pseudocode, standard algorithms (searching, sorting, totalling, counting, max/min), validation and testing with trace tables.

Statometer87BankerNext Paper 294%
Marks a paper20.6 · 28%Rank#4 of 10 · #2 on P2Trend · last 12Oct/Nov 24 · 23: 21 marksFeb/Mar 25 · 22: 27 marksMay/Jun 25 · 21: 15 marksMay/Jun 25 · 22: 22 marksMay/Jun 25 · 23: 21 marksOct/Nov 25 · 21: 16 marksOct/Nov 25 · 22: 6 marksOct/Nov 25 · 23: 15 marksFeb/Mar 26 · 22: 29 marksMay/Jun 26 · 21: 14 marksMay/Jun 26 · 22: 13 marksMay/Jun 26 · 23: 19 marks
9 in 10 chance in the next paper

Everything for this topic — study hub

O Level / IGCSE · 2210 · 0478 · Paper 2

Statometer — what 25 real papers say about this topic and each of its 6 syllabus bullets

Banker · #4 of 10 in O Level / IGCSE · recomputed with every new session

87BANKER
Banker#4 of 10 in O Level / IGCSE#2 on Paper 2 Easing

Set in nearly every paper and worth a big slice of it — revise first, expect it.

Next Paper 2
94%
9 in 10 chance it is set
Marks a paper
20.6 / 75
28% of Paper 2 · fair share 25%
Appeared in
25 / 25
Paper 2 sittings 20232026
Last set
May/Jun 2026
0478/23 · Q5 · 7 marks · 11-series streak
Marks in each of the last 12 Paper 2 sittingsOct/Nov 24May/Jun 26
Oct/Nov 24 · 23: 21 marksFeb/Mar 25 · 22: 27 marksMay/Jun 25 · 21: 15 marksMay/Jun 25 · 22: 22 marksMay/Jun 25 · 23: 21 marksOct/Nov 25 · 21: 16 marksOct/Nov 25 · 22: 6 marksOct/Nov 25 · 23: 15 marksFeb/Mar 26 · 22: 29 marksMay/Jun 26 · 21: 14 marksMay/Jun 26 · 22: 13 marksMay/Jun 26 · 23: 19 marks

What the papers say

  • Set in 25 of 25 Paper 2 sittings on the current syllabus — treat it as certain.
  • Worth about 20.6 marks a paper (28% of Paper 2).
  • Last set May/Jun 2026 · 0478/23 · Q5 for 7 marks — in the most recent series.
  • Set in each of the last 11 series without a miss.
  • Easing off: about 25.2 marks a paper earlier, 18.1 in the latest years — still examined, just smaller.
  • Lives on “Complete” and “Describe” — 45% of its questions: you must produce something — code, a diagram, a table — practise doing it, not reading it.
  • 54% of its questions involve a diagram, table or figure — practise with pen and paper.
  • 57% of its questions are set out as code, pseudocode or a table to complete.
  • Most of its marks (80%) come in extended questions of 6+ marks — plan the answer before writing.
  • Its biggest question so far: 16 marks (Oct/Nov 2023 · 0478/21 · Q8).
  • Inside the topic, Test data (normal, abnormal, extreme, boundary); trace tables for dry runs; identifying and correcting errors in algorithms carries the most marks (24%) and The program development life cycle the least (3%).
  • It is examined mostly as AO2 (Apply to a context, 66%), the rest AO1 (28%) — you must apply it to the scenario or the given data — a definition alone will not score.
  • The examiner has commented on 159 of its questions — read “What the examiner said” before you practise.

Command words

Share of questions using the word (a question can use several). What each wants →

Question shapes

  • 1–2 mk25
  • 3–4 mk59
  • 5–6 mk84
  • 7–9 mk86
  • 10+ mk42

Average 6.8 marks a question · 54% with a figure or table · 57% with code · biggest 16 marks

Assessment objectives — how it is examined

Every part of every current-syllabus question filed under Cambridge's AO1 / AO2 / AO3 (from its command word and what it asks you to do), so you know whether this topic pays for definitions, for applying, or for judging and building.

  • AO1 Knowledge & understanding
  • AO2 Apply to a context
  • AO3 Evaluate & judge

Paper 2 as a whole

Paper 2SyllabusMeasured
AO1 Knowledge & understanding20%27%
AO2 Apply to a context60%51%
AO3 Evaluate & judge20%22%

Syllabus = Cambridge's grid; measured = the bank's current-syllabus papers.

Inside the topic — every syllabus bullet, measured

Each part of each question is filed under the bullet it examines; the numbers are per Paper 2 sitting, exactly like the topic's. Open a bullet for its own Statometer.

  • The program development life cycle#15 of 19 on Paper 2Occasional · 3346% next paper1.7 marks12/25 sittings May/Jun 2026

    Rotated in occasionally — the bullet students skip and then meet.Syllabus: analysis, design, coding and testing, and what happens at each stage

    Next Paper 2
    46%
    2 in 4
    Marks a paper
    1.7
    2% of the paper · 3% of the topic
    Asked in
    12 / 25
    Paper 2 sittings · 19 questions
    Last asked
    May/Jun 2026
    2210/22 · Q4 · 3 marks
    • Asked in 12 of 25 Paper 2 sittings — roughly one paper in 2.
    • About 1.7 marks a paper (2% of Paper 2; 3% of the topic's marks across its 6 bullets).
    • Last asked May/Jun 2026 · 2210/22 · Q4 (3 marks) — in the most recent series.
    • Usually “Identify”: short, precise answers in syllabus words.
    • Biggest chunk of marks so far: 6 in Feb/Mar 2026 · 0478/22 · Q3.
    • It is examined almost entirely as AO1 (Knowledge & understanding, 98%) — definitions and descriptions in syllabus words score.
    Last 12 sittings Steady
    Oct/Nov 24 · 23: 6 marksFeb/Mar 25 · 22: 4 marksMay/Jun 25 · 21: 0 marksMay/Jun 25 · 22: 1 marksMay/Jun 25 · 23: 0 marksOct/Nov 25 · 21: 0 marksOct/Nov 25 · 22: 0 marksOct/Nov 25 · 23: 0 marksFeb/Mar 26 · 22: 6 marksMay/Jun 26 · 21: 0 marksMay/Jun 26 · 22: 3 marksMay/Jun 26 · 23: 0 marks

    Assessment objectives

    • AO1 Knowledge & understanding
    • AO2 Apply to a context
    • AO3 Evaluate & judge
    • Identify32%
    • Describe26%
    • Tick21%
    • State16%
  • Sub-systems and decomposition (inputs, processes, outputs, storage); designing solutions with structure diagrams, flowcharts and pseudocode#9 of 19 on Paper 2Core · 5879% next paper3.1 marks20/25 sittings May/Jun 2026

    A regular earner inside the topic — most papers touch it.

    Next Paper 2
    79%
    8 in 10
    Marks a paper
    3.1
    4% of the paper · 17% of the topic
    Asked in
    20 / 25
    Paper 2 sittings · 97 questions
    Last asked
    May/Jun 2026
    0478/23 · Q5 · 2 marks · 4-series streak
    • Asked in 20 of 25 Paper 2 sittings — about 8 papers in 10.
    • About 3.1 marks a paper (4% of Paper 2; 17% of the topic's marks across its 6 bullets).
    • Last asked May/Jun 2026 · 0478/23 · Q5 (2 marks) — in the most recent series.
    • Asked in each of the last 4 series.
    • Easing: 3.7 → 2.5 marks a paper.
    • Usually “Complete”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
    • Biggest chunk of marks so far: 8 in May/Jun 2025 · 0478/23 · Q1.
    • It is examined mostly as AO2 (Apply to a context, 66%), the rest AO1 (34%) — you must apply it to the scenario or the given data — a definition alone will not score.
    Last 12 sittings Easing
    Oct/Nov 24 · 23: 4.5 marksFeb/Mar 25 · 22: 0 marksMay/Jun 25 · 21: 4 marksMay/Jun 25 · 22: 4 marksMay/Jun 25 · 23: 8 marksOct/Nov 25 · 21: 4 marksOct/Nov 25 · 22: 0 marksOct/Nov 25 · 23: 2 marksFeb/Mar 26 · 22: 1.5 marksMay/Jun 26 · 21: 3 marksMay/Jun 26 · 22: 0.5 marksMay/Jun 26 · 23: 2 marks

    Assessment objectives

    • AO1 Knowledge & understanding
    • AO2 Apply to a context
    • AO3 Evaluate & judge
    • Complete55%
    • Write17%
    • Describe16%
    • Explain14%
  • Explaining the purpose of a given algorithm; standard methods of solution#11 of 19 on Paper 2Regular · 5471% next paper2.9 marks18/25 sittings May/Jun 2026

    Set most sessions for a few marks; know the definition and one example.Syllabus: linear search, bubble sort, totalling, counting, maximum/minimum/average

    Next Paper 2
    71%
    7 in 10
    Marks a paper
    2.9
    4% of the paper · 19% of the topic
    Asked in
    18 / 25
    Paper 2 sittings · 78 questions
    Last asked
    May/Jun 2026
    0478/23 · Q3 · 0.5 marks · 11-series streak
    • Asked in 18 of 25 Paper 2 sittings — about 7 papers in 10.
    • About 2.9 marks a paper (4% of Paper 2; 19% of the topic's marks across its 6 bullets).
    • Last asked May/Jun 2026 · 0478/23 · Q3 (0.5 marks) — in the most recent series.
    • Asked in each of the last 11 series.
    • Easing: 4.6 → 2 marks a paper.
    • Usually “Complete”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
    • Biggest chunk of marks so far: 8 in May/Jun 2023 · 0478/23 · Q7.
    • It is examined almost entirely as AO2 (Apply to a context, 82%) — you must apply it to the scenario or the given data — a definition alone will not score.
    Last 12 sittings Easing
    Oct/Nov 24 · 23: 0 marksFeb/Mar 25 · 22: 1 marksMay/Jun 25 · 21: 0 marksMay/Jun 25 · 22: 6 marksMay/Jun 25 · 23: 2 marksOct/Nov 25 · 21: 2 marksOct/Nov 25 · 22: 0 marksOct/Nov 25 · 23: 4 marksFeb/Mar 26 · 22: 1.5 marksMay/Jun 26 · 21: 4 marksMay/Jun 26 · 22: 0.5 marksMay/Jun 26 · 23: 1.5 marks

    Assessment objectives

    • AO1 Knowledge & understanding
    • AO2 Apply to a context
    • AO3 Evaluate & judge
    • Complete50%
    • Explain28%
    • Describe24%
    • Identify21%
  • Validation checks (range, length, type, presence, format, check digit) and verification checks (visual, double entry)#7 of 19 on Paper 2Core · 6275% next paper3.7 marks20/25 sittings May/Jun 2026

    A regular earner inside the topic — most papers touch it.

    Next Paper 2
    75%
    7 in 10
    Marks a paper
    3.7
    5% of the paper · 19% of the topic
    Asked in
    20 / 25
    Paper 2 sittings · 84 questions
    Last asked
    May/Jun 2026
    0478/23 · Q3 · 10 marks · 10-series streak
    • Asked in 20 of 25 Paper 2 sittings — about 8 papers in 10.
    • About 3.7 marks a paper (5% of Paper 2; 19% of the topic's marks across its 6 bullets).
    • Last asked May/Jun 2026 · 0478/23 · Q3 (10 marks) — in the most recent series.
    • Asked in each of the last 10 series.
    • Usually “Give” or “Describe”: short, precise answers in syllabus words.
    • Biggest chunk of marks so far: 10 in May/Jun 2026 · 0478/23 · Q3.
    • It is examined mostly as AO1 (Knowledge & understanding, 54%), the rest AO2 (37%) — definitions and descriptions in syllabus words score.
    Last 12 sittings Steady
    Oct/Nov 24 · 23: 1 marksFeb/Mar 25 · 22: 2 marksMay/Jun 25 · 21: 7 marksMay/Jun 25 · 22: 4 marksMay/Jun 25 · 23: 2 marksOct/Nov 25 · 21: 7 marksOct/Nov 25 · 22: 0 marksOct/Nov 25 · 23: 0 marksFeb/Mar 26 · 22: 8 marksMay/Jun 26 · 21: 1 marksMay/Jun 26 · 22: 0 marksMay/Jun 26 · 23: 10 marks

    Assessment objectives

    • AO1 Knowledge & understanding
    • AO2 Apply to a context
    • AO3 Evaluate & judge
    • Give33%
    • Describe31%
    • Explain30%
    • Identify23%
  • Test data (normal, abnormal, extreme, boundary); trace tables for dry runs; identifying and correcting errors in algorithms#4 of 19 on Paper 2Banker · 8287% next paper5.4 marks23/25 sittings May/Jun 2026

    Asked in nearly every paper — the bullet to know cold.

    Next Paper 2
    87%
    9 in 10
    Marks a paper
    5.4
    7% of the paper · 24% of the topic
    Asked in
    23 / 25
    Paper 2 sittings · 98 questions
    Last asked
    May/Jun 2026
    0478/23 · Q5 · 5 marks · 11-series streak
    • Asked in 23 of 25 Paper 2 sittings — nearly every paper.
    • About 5.4 marks a paper (7% of Paper 2; 24% of the topic's marks across its 6 bullets).
    • Last asked May/Jun 2026 · 0478/23 · Q5 (5 marks) — in the most recent series.
    • Asked in each of the last 11 series.
    • Usually “Complete”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
    • Biggest chunk of marks so far: 9 in Oct/Nov 2024 · 2210/23 · Q7.
    • It is examined almost entirely as AO2 (Apply to a context, 78%) — you must apply it to the scenario or the given data — a definition alone will not score.
    Last 12 sittings Steady
    Oct/Nov 24 · 23: 9.5 marksFeb/Mar 25 · 22: 14 marksMay/Jun 25 · 21: 4 marksMay/Jun 25 · 22: 4 marksMay/Jun 25 · 23: 4 marksOct/Nov 25 · 21: 3 marksOct/Nov 25 · 22: 6 marksOct/Nov 25 · 23: 1 marksFeb/Mar 26 · 22: 5 marksMay/Jun 26 · 21: 0 marksMay/Jun 26 · 22: 9 marksMay/Jun 26 · 23: 5.5 marks

    Assessment objectives

    • AO1 Knowledge & understanding
    • AO2 Apply to a context
    • AO3 Evaluate & judge
    • Complete50%
    • Describe30%
    • Give28%
    • State24%
  • Writing and amending algorithms for a scenario in pseudocode, program code and flowcharts#12 of 19 on Paper 2Regular · 4555% next paper2.7 marks15/25 sittings May/Jun 2026

    Set most sessions for a few marks; know the definition and one example.

    Next Paper 2
    55%
    6 in 10
    Marks a paper
    2.7
    4% of the paper · 18% of the topic
    Asked in
    15 / 25
    Paper 2 sittings · 78 questions
    Last asked
    May/Jun 2026
    2210/21 · Q10 · 6 marks · 11-series streak
    • Asked in 15 of 25 Paper 2 sittings — about 6 papers in 10.
    • About 2.7 marks a paper (4% of Paper 2; 18% of the topic's marks across its 6 bullets).
    • Last asked May/Jun 2026 · 2210/21 · Q10 (6 marks) — in the most recent series.
    • Asked in each of the last 11 series.
    • Easing: 3.1 → 2.5 marks a paper.
    • Usually “Write”: you must produce something — code, a diagram, a table — practise doing it, not reading it.
    • Biggest chunk of marks so far: 6 in May/Jun 2026 · 2210/21 · Q10.
    • It is examined almost entirely as AO2 (Apply to a context, 100%) — you must apply it to the scenario or the given data — a definition alone will not score.
    Last 12 sittings Easing
    Oct/Nov 24 · 23: 0 marksFeb/Mar 25 · 22: 5 marksMay/Jun 25 · 21: 0 marksMay/Jun 25 · 22: 3 marksMay/Jun 25 · 23: 5 marksOct/Nov 25 · 21: 0 marksOct/Nov 25 · 22: 0 marksOct/Nov 25 · 23: 6 marksFeb/Mar 26 · 22: 3 marksMay/Jun 26 · 21: 6 marksMay/Jun 26 · 22: 0 marksMay/Jun 26 · 23: 0 marks

    Assessment objectives

    • AO1 Knowledge & understanding
    • AO2 Apply to a context
    • AO3 Evaluate & judge
    • Write62%
    • Describe22%
    • Give17%
    • Complete17%

12% of the topic's marks sit in question parts that belong to another topic (scenario questions cross sections) or that no bullet claims; they count for the topic, not for a bullet.

Marks a paper, year by year

1011121314151617181920212223242526

Grey years are the previous syllabus (20102022, 205 questions) — history, not counted in the rates.

By exam series

  • Feb/Mar4/4 · 26.8 mk
  • May/Jun12/12 · 21.4 mk
  • Oct/Nov9/9 · 20.6 mk

What you need to know6syllabus section 7

  1. The program development life cycleanalysis, design, coding and testing, and what happens at each stage
  2. Sub-systems and decomposition (inputs, processes, outputs, storage); designing solutions with structure diagrams, flowcharts and pseudocode
  3. Explaining the purpose of a given algorithm; standard methods of solutionlinear search, bubble sort, totalling, counting, maximum/minimum/average
  4. Validation checks (range, length, type, presence, format, check digit) and verification checks (visual, double entry)
  5. Test data (normal, abnormal, extreme, boundary); trace tables for dry runs; identifying and correcting errors in algorithms
  6. Writing and amending algorithms for a scenario in pseudocode, program code and flowcharts

Video lectures13ZAK's YouTube channel · play here

  • O LevelAS2023116 views

  • O LevelAS2021526 views

  • O LevelUrdu2021370 views

  • O Level2021607 views

  • O Level2020843 views

  • O Level2020731 views

Infographics3draw these the way the examiner expects · download as PNG

Flowchart symbolsUse exactly these shapes. Every decision has two labelled exits; flow lines carry arrows; one START, oneSTOP.TerminatorSTART / STOPProcessTotal ← Total + NInput / OutputINPUT N · OUTPUT TotalDecisionN > 0 ? → Yes / NoSubroutinepredefined process / callflow line (arrow)STARTINPUT NumNum > 0 ?YesOUTPUT "Positive"NoOUTPUT "Not +"STOPProgram development life cycleAnalysisDesignCodingTestingAnalysis (abstraction, decomposition → requirements) · Design (structure diagram, flowchart, pseudocode) · Coding · Testingcswithzak.com

Flowchart symbols & the PDLC

O LevelAS
Bubble sort — one pass, step by stepCompare each pair of neighbours; swap if out of order. After pass 1 the biggest is last; after pass n−1everything is sorted.5381compare 5 and 3 → 5 > 3, swap3581compare 5 and 8 → in order, no swap3581compare 8 and 1 → 8 > 1, swap3518end of pass 1: the largest value is now lastPass 2 → 3 1 5 8 · Pass 3 → 1 3 5 8. Each pass needs one fewer comparison. Stop early if a pass makes no swaps.FOR i ← 1 TO N - 1 FOR j ← 1 TO N - i IF A[j] > A[j+1] THEN Temp ← A[j] A[j] ← A[j+1] A[j+1] ← Temp ENDIF NEXT jNEXT iFlag version: REPEAT … Swapped ← FALSE… set TRUE on any swap … UNTIL NOT SwappedLinear search (the other standard algorithm)Found ← FALSE : i ← 1 : WHILE i ≤ N AND NOT Found → IF A[i] = Target THEN Found ← TRUE ELSE i ← i + 1Works on unsorted data; checks every item in the worst case. Binary search (AS) needs sorted data and halves the list each time.Totalling: Total ← Total + Value · Counting: Count ← Count + 1 when true · Max/min: compare with the current bestcswithzak.com

Bubble sort & linear search

O LevelAS
Choosing test dataRule under test: “enter a mark from 0 to 100”. Each type of test data has a job — name the type AND saywhy it is chosen.-1050100101accepted range 0 … 100rejectedrejectedTypePurposeExamples hereNormaltypical valid data the program should accept and process23, 50, 87Extremevalid data at the very limits of the accepted range0 and 100Boundaryeither side of each limit: last accepted, first rejected-1 / 0 and 100 / 101Abnormalinvalid (erroneous) data the program must reject-5, 150, “abc”, 3.7Validation: is the data sensible? range · type · length · format · presence · check digit checks.Verification: was it entered correctly? double entry, visual check.Trace table / dry run: one column per variable and the output, one row per change — the way to find logic errors.9618 adds: walkthrough (people read the code), alpha (in-house), beta (real users before release), acceptance (the client signs off).cswithzak.com

Choosing test data

O LevelAS

Browse all infographics →

Key terms11use these exact words in the exam

abstractiondecompositionflowchartpseudocodelinear searchbubble sortvalidationverificationtrace tabletest databoundary data

Dotted terms are defined in the glossary.

Code help4referenced to the Cambridge pseudocode guide

Linear search

pseudocode 9618 §7.3 WHILE Run in Playground
DECLARE A : ARRAY[1:6] OF INTEGER
DECLARE i, Target : INTEGER
DECLARE Found : BOOLEAN
A[1] 8
A[2] 3
A[3] 9
A[4] 1
A[5] 7
A[6] 4
Target 7
Found FALSE
i 1
WHILE i <= 6 AND NOT Found DO
IF A[i] = Target THEN
Found TRUE
ELSE
i i + 1
ENDIF
ENDWHILE
IF Found THEN
OUTPUT "Found at position ", i
ELSE
OUTPUT "Not found"
ENDIF

Bubble sort with a swapped flag

pseudocode Run in Playground
DECLARE A : ARRAY[1:5] OF INTEGER
DECLARE i, Temp : INTEGER
DECLARE Swapped : BOOLEAN
A[1] 5
A[2] 1
A[3] 4
A[4] 2
A[5] 3
REPEAT
Swapped FALSE
FOR i 1 TO 4
IF A[i] > A[i + 1] THEN
Temp A[i]
A[i] A[i + 1]
A[i + 1] Temp
Swapped TRUE
ENDIF
NEXT i
UNTIL NOT Swapped
FOR i 1 TO 5
OUTPUT A[i]
NEXT i

💡 Open the Trace Table tab after running — this is the classic Paper 2 trace question.

Totalling, counting, max, min, average

pseudocode Run in Playground
DECLARE Marks : ARRAY[1:5] OF INTEGER
DECLARE i, Total, Count, Max, Min : INTEGER
Marks[1] 67
Marks[2] 91
Marks[3] 45
Marks[4] 78
Marks[5] 84
Total 0
Count 0
Max Marks[1]
Min Marks[1]
FOR i 1 TO 5
Total Total + Marks[i]
IF Marks[i] >= 50 THEN
Count Count + 1
ENDIF
IF Marks[i] > Max THEN
Max Marks[i]
ENDIF
IF Marks[i] < Min THEN
Min Marks[i]
ENDIF
NEXT i
OUTPUT "Total ", Total, " Passes ", Count, " Max ", Max, " Min ", Min, " Avg ", Total / 5

Validation: range + presence with re-prompt

pseudocode Run in Playground
DECLARE Age : INTEGER
REPEAT
OUTPUT "Enter age 5-120"
INPUT Age
IF Age < 5 OR Age > 120 THEN
OUTPUT "Out of range, try again"
ENDIF
UNTIL Age >= 5 AND Age <= 120
OUTPUT "Accepted ", Age

Playground examples24runnable programs for this topic

  • Swap two variables

    The three-line swap with a temporary variable — a favourite trace-table question.

    O LevelASPseudocodeBasics & data types §1.5
    Run
  • FOR loop & totalling

    A count-controlled loop that accumulates a running total.

    O LevelASPseudocodeIteration §7.1
    Run
  • WHILE with a sentinel — totalling & counting

    Read numbers until -1; INPUT once before the loop and again at the end of the body.

    O LevelASPseudocodeIteration §7.3 · 2210 WHILE … DO
    Run
  • Maximum, minimum & average

    The standard algorithm: start Highest very low and Lowest very high, then update as you go.

    O LevelASPseudocodeIteration 2210 §7.1 standard methods
    Run
  • Counting — how many passed?

    Two counters updated inside a loop, then a percentage.

    O LevelASPseudocodeIteration 2210 §7.1 standard methods
    Run
  • Total, average and position of the maximum

    Keep the index of the best value, not just the value, so you can say where it was.

    O LevelASPseudocodeArrays §3.2
    Run
  • Range check

    Keep asking until the value is between 0 and 100.

    O LevelASPseudocodeValidation, testing & exceptions 2210 §7.3 / 9618 §6.2
    Run
  • Presence & length checks

    Nothing entered? Too short or too long? Say which check failed.

    O LevelASPseudocodeValidation, testing & exceptions 2210 §7.3 / 9618 §6.2
    Run
  • Type check — digits only

    A function that tests every character before the string is converted to a number.

    O LevelASPseudocodeValidation, testing & exceptions 2210 §7.3 / 9618 §6.2
    Run
  • Format check — is this an email address?

    One @ that is not first, and a dot after it that is not last.

    O LevelASPseudocodeValidation, testing & exceptions 2210 §7.3 / 9618 §6.2
    Run
  • Check digit — ISBN-13

    Weights 1 and 3 alternate, total MOD 10, subtract from 10. The classic check-digit algorithm.

    O LevelASPseudocodeValidation, testing & exceptions 2210 §2.3, §7.3
    Run
  • Verification — double entry

    Validation checks the data is sensible; verification checks it was entered correctly.

    O LevelASPseudocodeValidation, testing & exceptions 2210 §7.3 / 9618 §6.2
    Run
  • Trace table practice

    A typical dry-run question. Run it, then open the Trace table tab and check it against your own table.

    O LevelASPseudocodeValidation, testing & exceptions 2210 §7.4 / 9618 §12.3
    Run
  • Normal, boundary and abnormal test data

    Drive a function with each kind of test data and check the results against what you expected.

    ASPseudocodeValidation, testing & exceptions 9618 §12.3
    Run
  • Linear search

    Check each element in turn and stop as soon as the target is found.

    O LevelASPseudocodeSearching 2210 §7.1 / 9618 §9.2
    Run
  • Linear search — every match

    Do not stop at the first hit: report every position and count them.

    O LevelASPseudocodeSearching 2210 §7.1
    Run
  • Bubble sort

    Compare neighbours and swap; after each pass the largest value has bubbled to the end.

    O LevelASPseudocodeSorting 2210 §7.1 / 9618 §9.2
    Run
  • Sort names alphabetically

    Bubble sort works on strings too: "Ali" < "Zara" compares character codes.

    O LevelASPseudocodeSorting 2210 §7.1
    Run
  • O Level Section B — a week of temperatures

    Validate seven readings into an array, then report the average and the hottest day. Everything Paper 2 Section B expects in one program.

    O LevelPseudocodeExam-style tasks 2210 §7–8
    Run
  • O Level Section B — cinema booking

    Ticket types with CASE, quantities, a running total and a group discount.

    O LevelPseudocodeExam-style tasks 2210 §7–8
    Run
  • Totalling, counting, max, min, average

    The standard loop pattern with a list — and then the built-ins sum(), max(), min(), len() that do it in one line.

    O LevelASPythonIteration §7.1 ↔ Python
    Run
  • Validation loop — range and type checks

    Keep asking until the input is a whole number between 1 and 100. try/except catches the ValueError from int().

    O LevelASPythonValidation, testing & exceptions §7.3 ↔ Python, A2 §20.3
    Run
  • Linear search

    Walk the list until you find the target — the exam wants the loop, not list.index().

    O LevelASPythonSearching §7 ↔ Python
    Run
  • Bubble sort with a swapped flag

    The classic Paper 2 / Paper 4 sort. Open the Trace tab to watch the swaps.

    O LevelASPythonSorting §7 ↔ Python
    Run

Flowchart Studio12draw-it-yourself tasks and worked flowcharts, run and checked box by box

  • Area of a rectangle

    Input two numbers, multiply, output — the simplest complete flowchart.

    O LevelASSequence & I/O 2210 §7
    Open
  • Celsius to Fahrenheit

    A formula in a process box; the exam's favourite two-line calculation.

    O LevelSequence & I/O 2210 §7
    Open
  • Pass or fail

    One decision, two output boxes, arrows that rejoin before Stop.

    O LevelSelection 2210 §7
    Open
  • Largest of three numbers

    Nested decisions: the chart shows why the second comparison depends on the first.

    O LevelASSelection 2210 §7
    Open
  • Total and average of N numbers

    Totalling and counting together, then a division after the loop — the classic 2210 Q.

    O LevelASTotalling, counting, max / min 2210 §7
    Open
  • Total until −1 (rogue value)

    A sentinel-controlled loop: read, test, add, read again.

    O LevelASTotalling, counting, max / min 2210 §7
    Open
  • Highest and lowest of 10 marks

    Set max low and min high, then one decision each inside the loop.

    O LevelASTotalling, counting, max / min 2210 §7
    Open
  • Count how many passed

    A counter that only increments inside a decision.

    O LevelTotalling, counting, max / min 2210 §7
    Open
  • Range check with a rejection loop

    Keep asking until the value is between 1 and 100 — the validation flowchart every paper wants.

    O LevelASValidation & rejection loops 2210 §7
    Open
  • Presence check

    A WHILE loop that rejects an empty string.

    O LevelValidation & rejection loops 2210 §7
    Open
  • Linear search

    Search an array for a value with a found flag — 2210 §7's standard method.

    O LevelASArrays 2210 §7
    Open
  • One pass of a bubble sort

    Compare neighbours and swap: the decision inside the loop with three process boxes.

    O LevelASArrays 2210 §7
    Open

Test yourself

Ready to check you know it?

Every round is a fresh random draw, weak cards come back until you get them right, and past-paper questions come with their mark schemes. Marks earn XP on your dashboard.

Enroll nowOnline classes