You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson consolidates everything from OCR J277 Section 2.1 with exam-style practice and techniques for tackling computational thinking questions in Paper 2.
| Topic | Key Points |
|---|---|
| Computational thinking | Four components: decomposition, abstraction, algorithmic thinking, pattern recognition |
| Decomposition | Breaking problems into manageable sub-problems; leads to subprograms |
| Abstraction | Removing unnecessary detail; focusing on relevant information |
| Algorithmic thinking | Step-by-step solutions; sequence, selection, iteration |
| Pattern recognition | Identifying similarities; generalisation; code reuse |
| Inputs, processes, outputs | IPO model; identify all three for any system |
| Structure diagrams | Visual representation of decomposition; hierarchical tree |
| Flowcharts | Standard symbols; terminators, processes, decisions, I/O |
| Pseudocode | OCR reference language; variables, selection, iteration, arrays, functions |
Paper 2 (Computational Thinking, Algorithms and Programming) tests Section 2.1 through:
OCR Exam Tip: Paper 2 questions are more practical than Paper 1. You will need to actually design algorithms (pseudocode and flowcharts), trace through code, and apply computational thinking to given scenarios. Practice is essential.
Question: A school wants to create a system to manage student homework. (a) Decompose this problem into at least four sub-problems. (4 marks) (b) Explain how abstraction would be used when designing the student record for this system. (2 marks)
Model answer (a):
Any four valid sub-problems for 4 marks.
Model answer (b): Abstraction would be used to include only the relevant data about each student, such as their name, student ID, and class group (1). Unnecessary details like their height, eye colour, or home address would be excluded because they are not relevant to the homework management system (1).
Question: A cinema charges different ticket prices based on age. Under 12: £5. 12-17: £7. 18 and over: £10. Draw a flowchart that inputs a customer's age and outputs the correct ticket price. (5 marks)
Model answer:
flowchart TD
A(["Start"]) --> B["INPUT age"]
B --> C{"Is age < 12?"}
C -->|Yes| D["OUTPUT '£5'"]
D --> Z(["Stop"])
C -->|No| E{"Is age < 18?"}
E -->|Yes| F["OUTPUT '£7'"]
F --> Z
E -->|No| G["OUTPUT '£10'"]
G --> Z
Marking points:
Question: Study the following pseudocode:
x = 1
total = 0
while x <= 5
total = total + x
x = x + 1
endwhile
print(total)
(a) Complete the trace table. (4 marks) (b) State the output of this algorithm. (1 mark)
Model answer (a):
| Iteration | x | total | x <= 5 |
|---|---|---|---|
| Start | 1 | 0 | - |
| 1 | 2 | 1 | True |
| 2 | 3 | 3 | True |
| 3 | 4 | 6 | True |
| 4 | 5 | 10 | True |
| 5 | 6 | 15 | False |
Model answer (b): The output is 15.
OCR Exam Tip: When completing trace tables, update variables in the order they appear in the code. Be careful about when the loop condition is checked — in a WHILE loop, it is checked BEFORE each iteration. Write down every change to every variable, even if the change seems obvious. This prevents careless errors.
Question: A school needs to build: (1) a system to book sports equipment, (2) a system to book science equipment. Identify the patterns between these two problems and explain how recognising these patterns helps. (3 marks)
Model answer: Both systems need to: record item availability, allow users to make bookings, set and check return dates, and send reminders for overdue items (1). Recognising this pattern means a generalised booking system can be designed that works for both sports and science equipment (1). This saves development time, ensures consistency between the systems, and means any bug fixes or improvements only need to be made once (1).
| Mistake | Correction |
|---|---|
| Using the wrong flowchart symbol | Rectangle = process, diamond = decision, parallelogram = I/O |
| Forgetting to label Yes/No on decision symbols | Always label both exits from every diamond |
| Trace table errors (updating variables in wrong order) | Follow the code line by line; update in the exact order written |
| Confusing WHILE and DO...UNTIL | WHILE checks before; DO...UNTIL checks after and always runs at least once |
| Vague decomposition | Be specific: "process the order" is vague; "calculate total, apply discount, process payment" is specific |
| Missing inputs or outputs in IPO | Remember system inputs (date, time), database inputs, and non-screen outputs (files, emails) |
| Forgetting MOD and DIV | MOD = remainder (7 MOD 3 = 1), DIV = integer division (7 DIV 3 = 2) |
| Term | Definition |
|---|---|
| Computational thinking | Problem-solving approach using decomposition, abstraction, algorithmic thinking, and pattern recognition |
| Decomposition | Breaking a complex problem into smaller sub-problems |
| Abstraction | Removing unnecessary detail to focus on what is relevant |
| Algorithmic thinking | Creating step-by-step solutions to problems |
| Pattern recognition | Identifying similarities between problems |
| Structure diagram | Hierarchical diagram showing decomposition of a problem |
| Flowchart | Visual representation of an algorithm using standard symbols |
| Pseudocode | Structured, language-independent way of writing algorithms |
| Trace table | Table tracking variable values step by step through an algorithm |
| IPO | Input-Process-Output model for describing systems |
This lesson has consolidated all the computational thinking content from OCR J277 Section 2.1. For the exam: apply the four components of computational thinking systematically, use correct flowchart symbols, follow OCR pseudocode conventions, complete trace tables carefully, and always be specific in your answers. Practise designing algorithms and tracing through code under timed conditions to build speed and accuracy.
A car park charges drivers based on how long they stay. The rules are: the first hour is free, the next two hours cost £2 per hour, and every additional hour after that costs £3 per hour. The maximum daily charge is capped at £15. The system must accept the number of whole hours parked and output the total charge.
Step 1 — Decomposition. The problem naturally splits into three sub-problems: (1) read the input (number of hours), (2) calculate the charge using the banded pricing rules, (3) output the result. Each can be tested independently.
Step 2 — Abstraction. We ignore irrelevant detail: the colour of the car, the make and model, the driver's name, the time of day they arrived, and the weather. We only need the duration in whole hours.
Step 3 — IPO.
| Input | Process | Output |
|---|---|---|
| hours (integer) | Apply banded pricing: 0-1 free, 2-3 at £2/h, 4+ at £3/h, capped at £15 | charge (real) |
Step 4 — Algorithm in OCR pseudocode.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.