OCR H446 2.2.1: Programming techniques
The free BugBot lessons that teach this point, a robot to try it on, and the past-paper questions that test it.
What it covers
At GCSE you met five data types (F1.8): integer, real, Boolean, character and string, and the three constructs sequence, selection and iteration (F2). A level keeps all of that and asks for more precision. There are more types to know, including ones you build yourself, and the exam expects the exact names for kinds of loop and for the difference between a variable and a constant.
- The types you need to know
- References: two names, one value
- User-defined types
- Declaration, assignment and constants
- Iteration: definite and indefinite
Or do it in the simulator, with tasks that mark themselves
Lessons that teach it
- A1.1 Data types and programming constructs Programming techniques and object-oriented programming
The A level data types, references and user-defined types, constants, and definite and indefinite iteration. - A1.4 Subroutines, parameters and passing by reference Programming techniques and object-oriented programming
Out-of-line subroutines and their interfaces, returning several values, and passing by value and by reference. - A1.5 Scope, lifetime and debugging in an IDE Programming techniques and object-oriented programming
Local and global variables, why locals are good practice, and breakpoints, stepping, watches and tracebacks. - A1.7 Classes and objects Programming techniques and object-oriented programming
Classes, objects, attributes, methods and constructors; encapsulation, access specifiers, getters and setters, and class diagrams. - A1.8 Inheritance, polymorphism and overriding Programming techniques and object-oriented programming
Subclasses and super, overriding, polymorphism, and abstract, virtual and static methods, with robot behaviours as subclasses. - A1.10 Project: the behaviour controller Programming techniques and object-oriented programming
Get past a wall to the dock with prioritised behaviour classes, a controller that aggregates them, and an exception to finish. - A2.1 Stack frames and the call stack Recursion and computational thinking
Return addresses, parameters and local variables: what a subroutine call pushes, and what a return pops. - A2.2 Recursion Recursion and computational thinking
Base case and general case, winding and unwinding, and a spiral the robot draws by calling itself. - A2.3 Recursion versus iteration Recursion and computational thinking
The same algorithm both ways, the cost of a frame per call, repeated work, and stack overflow. - A15.1 How your A level is assessed Exam preparation
The papers and the project for OCR H446, AQA 7517 and Eduqas A500QS, the assessment objectives, and a timing plan built with integer… - A15.2 Command words and levels of response Exam preparation
What each command word asks for, how extended answers are marked in levels, and a marker that levels answers with regular expressions. - A15.3 Trace tables and hand-tracing Exam preparation
Tracing loops, recursion and Little Man Computer programs without slips, and a binary search that prints its own trace table. - A15.4 Pseudocode in the exam languages Exam preparation
OCR's exam reference language and AQA's pseudo-code side by side with Python, the traps in translating, and a stack class that brings the… - A15.5 Writing algorithms and code in the exam Exam preparation
Planning before writing, how code is marked, the standard algorithms to know by heart, and Dijkstra's algorithm driving the robot. - A15.6 Pre-release material and skeleton programs Exam preparation
Getting to know a skeleton program before the exam, the questions asked about it, and making exam-style changes to one. - A15.8 A revision plan and mixed practice Exam preparation
Mapping the specification, retrieval, spacing and interleaving, and a spaced repetition scheduler for the whole course.
Try it on a robot
The task from A1.1 Data types and programming constructs, running here. Change the program and press Run.
The specification is OCR's own document; this page says which of our lessons teach point 2.2.1 and is not endorsed by the board.