OCR J277 2.2.1: Programming fundamentals
The free BugBot lessons that teach this point, a robot to try it on, and the past-paper questions that test it.
Lessons that teach it
- F1.1 What a program is Programming basics
Instructions, one at a time, top to bottom. Running code and reading what comes back. - F1.2 Output: print Programming basics
Print text and numbers, several things at once. - F1.6 Variables, constants and assignment Programming basics
Storing, changing and naming values, and constants that never change. - F1.7 Input from the user Programming basics
Asking questions with input(), and why every answer is text. - F1.9 Arithmetic operators Programming basics
The seven operators, integer division and remainder, and the order they work in. - F2.1 Blocks and indentation Decisions and loops
How Python groups lines: the colon and the indent. - F2.2 Selection: if Decisions and loops
Relational operators, and a block that runs only when a condition is true. - F2.3 else, elif and Boolean operators Decisions and loops
Choosing between outcomes, and joining conditions with and, or and not. - F2.4 Nested selection and match Decisions and loops
Decisions inside decisions, and choosing by exact value with a case statement. - F2.5 Count-controlled loops: for Decisions and loops
range, the loop variable, and repeating a known number of times. - F2.6 Condition-controlled loops: while Decisions and loops
Looping until something changes, break, and loops that never end. - F2.7 Loop patterns Decisions and loops
Running totals, counting, finding the largest, nested loops and trace tables. - F13.9 Project: the revision robot Exam preparation
A robot that asks you questions, marks your answers and tells you what to revise.
Try it on a robot
The task from F1.1 What a program is, running here. Change the program and press Run.
Past paper questions on this
Real exam questions that test this, each worked through with a program you can run.
- AQA 8525 June 2025 Paper 1, Question 1: Operators in a short program, and a trace of a while loop that doubles 7 marks
- AQA 8525 June 2025 Paper 1, Question 2: A loyalty card with MOD and elif, and the value of the free items 7 marks
- AQA 8525 June 2025 Paper 1, Question 3: A coaching cost with three price bands 8 marks
- AQA 8525 June 2025 Paper 1, Question 5: Data types, and five inputs rewritten as a loop with one 8 marks
- AQA 8525 June 2025 Paper 1, Question 7: Read a subroutine: purpose, outputs, return value, parameter 7 marks
- AQA 8525 June 2025 Paper 1, Question 8: Trace a loop that compares two binary strings with OR, NOT and AND 6 marks
- AQA 8525 June 2025 Paper 1, Question 9: Which of five algorithms correctly total an array 2 marks
- AQA 8525 June 2025 Paper 1, Question 10: Records, and the smallest value in an array without min or sort 8 marks
- AQA 8525 June 2024 Paper 1, Question 1: LEN, POSITION, a data type, assignment, and a two line program 6 marks
- AQA 8525 June 2024 Paper 1, Question 2: Follow an IF, ELSEIF chain with NOT, OR, AND and MOD 5 marks
- AQA 8525 June 2024 Paper 1, Question 5: The output of a nested IF for three pairs of inputs 3 marks
- AQA 8525 June 2024 Paper 1, Question 6: Essay marks with penalties for late essays, never below 0 7 marks
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.