What are the essential building blocks of a program — and how are data stored, manipulated, and structured?
Every program, regardless of language, is built from the same three constructs: sequence (instructions run in order), selection (if-else branches choose between paths), and iteration (loops repeat a block). Data is stored in variables (changeable) or constants (fixed), typed appropriately — integer, real, boolean, character, string — and manipulated using arithmetic, comparison, and boolean operators.
OCR's additional programming techniques extend into data structures and abstraction. Arrays (1D and 2D) group related data under one name. Records group related fields of different types into one entity. File handling (open, read, write, close) allows data to persist beyond a single program run. SQL provides a way to query structured data: SELECT FROM WHERE is the basic pattern. Functions return values; procedures do not — both reduce repetition and improve maintainability. Students at St Leonards write answers in Python; the OCR Exam Reference Language (ERL) is also accepted in the exam.