Community resourceWorksheet
OCR H446 2.2.1 Programming techniques consolidation
Part 13 of 14 · H446 2.2.1 · Programming techniques
Consolidation across the whole of H446 2.2.1, built on a hack-day dashboard that mixes control flow, recursion, scope, parameter modes, debugging and object orientation. No new content is introduced, so the demand is selecting the right technique and supporting each explanation with evidence, with the planning support withdrawn as students work through it.
Students will:
- select an appropriate technique for a task and state a one-line plan for it
- trace a recursive function and the value it returns
- identify a range fault in a loop header, explain its effect and correct it
- implement a class combining stored state, a calculation and a decision
- justify an object-oriented design in which polymorphism produces type-specific output
Inside: 4 explanation cells, 1 multiple-choice question, 3 written answers, 1 Python task and 1 trace table. 19 marks, about 40 to 55 minutes.
Series: H446 2.2.1 · Programming techniques, part 13 of 14.
Shared by Coding PathwayVerified teacher
- 10 cells
- About 45 minutes
- CC BY-SA 4.0
- Shared 31 Aug 2026
- Updated 1 Oct 2026
Preview
The whole resource, exactly as a class sees it. Answers and marking are held back.
Programming techniques consolidation
A creative hack-day dashboard combines the techniques from this series.
Retrieval model
Before solving, label each demand: control flow; recursion; scope; modularity/parameters; debugging; or OOP. Then write the smallest relevant model: trace columns, call/base pair, scope boxes, interface arrows or object state.
Worked routing examples: “value unchanged after subprogram” → parameter model/scope; “last item omitted” → loop-bound debugging; “same method, different object behaviour” → polymorphism.
Complete the integrated code and explanations using evidence from each scenario.
Scaffold fading
For the first two tasks, write the method label and a one-line plan. For the integrated coding task, use constructor → independent state → method call → returned value → boundary tests. For explanations, use knowledge → mechanism → scenario consequence.
Check these examination-sensitive details before moving on:
- a base case stops further calls and begins unwinding;
- a getter returns a value rather than requesting input;
- a constructor sets the defaults stated in the requirements;
- an object is created with the exact class name;
- an IDE feature must match the purpose of writing, translating or debugging code.
A function changes a local parameter received by value. Which caller-side effect is expected?
- AThe original scalar remains unchanged.
- BThe original scalar must change.
- CEvery global is deleted.
- DThe function cannot return.
Trace this recursive Python function and its returned value.
Enter a value only when it changes. Keep the listing's order.
Use one row for each pass through the loop. Fill in a box only when that value changes on that row, and leave the rest blank.
def badge_total(n):if n <= 1:return nreturn n + badge_total(n - 2)result = badge_total(5)print(result)
| Row | n (badge_total) | result | Return value | Depth | n <= 1 | Output |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | ||||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
A loop uses range(1, participant_count) to process participant numbers 1 through participant_count. Identify the fault, its effect and a correction.
Answer all three demands.
Students type their answer here.
Integrate modularity and OOP
Implement Workshop with a title and capacity. spaces(booked) returns capacity - booked, but never below zero. status(booked) returns 'full' when no spaces remain and 'open' otherwise.
class Workshop:
passChoose two IDE features that would help diagnose a wrong status at booked = capacity. Explain a distinct use for each.
Name the feature, action and evidence it reveals.
Students type their answer here.
The dashboard needs several event types with a shared summary method but type-specific output. Recommend an OOP design and explain how polymorphism would be used.
State parent/child roles and the common call.
Students type their answer here.
Review your responses
Use evidence from your completed responses to identify the first state, interface or reasoning link that needs improvement. Correct it and reapply the idea to the integrated context.