Each case starts fresh. Tests check these examples, not every possible input or your choice of algorithm.
Need a hint?
How marking works
Python runs against behaviour tests. A different correct implementation can pass. Pseudocode is self-assessed with a worked answer and method checklist. Neither is an official OCR mark.
Use the specified names and return values. Tab indents; Ctrl/⌘ + Enter runs tests. Python loads from a pinned CDN only when you run it.
Replace this language’s draft with the starter?
Ready when you are.
Method matters
Review your solution
Tick only points your answer meets. Equivalent correct approaches can earn credit. Passing output tests alone does not prove recursion, complexity, encapsulation or the required algorithm.
Reveal one worked answer
This is one possible solution. Your own draft is kept separately.
Original TechDojo practice based on the supplied H446/02 specification and 2021–2025 paper styles. Not an official OCR assessment. Pseudocode conventions vary; judge the logic, not exact spelling.