2.1.2 Thinking Ahead Exam Questions
Paper 2 · Algorithms & Programming · 8 past paper questions · 36 marks
Exam questions for 2.1.2 Thinking ahead
8 OCR past paper questions (36 marks) with mark schemes
Answer each question, reveal the mark scheme, then award yourself marks. Scores and answers are saved in this browser so you can see which topics need more work.
Download Questions & Mark Scheme (PDF)Past paper questions
- Question 1H446/02 · June 20244 marks
A group of students are designing a racing car game. The game will allow players to enter their name and then a choice of vehicle. They will then race against other vehicles that will be controlled by the program. Players will use the arrow keys to control their vehicle. The students are identifying the inputs and outputs for the game. Complete the table by identifying two inputs and two outputs for the game.
Input 1 Input 2 Output 1 Output 2 Show mark scheme
Inputs: Arrow key presses / Player name / Vehicle selection / Accelerate/brake input Outputs: Graphics display / Sound effects / Score / Vehicle position / Collision feedback (4 marks - 1 per valid input/output)Mark yourself: how many marks did you get?/ 4 - Question 2H446/02 · June 20233 marks
A program is being designed that will allow a user to log into an account on a website using a username and password. Identify two possible inputs and one output this program will need.
Show mark scheme
Inputs: Username, Password, Login button click, Remember me checkbox Output: Success/failure message, Redirect to homepage, Error message, Session token (3 marks - 2 for inputs, 1 for output)Mark yourself: how many marks did you get?/ 3 - Question 3H446/022 marks
Taylor is designing a program to simulate earthquakes on major cities in 3D. Identify two different inputs for this program.
Show mark scheme
City selection / Earthquake magnitude / Simulation stage selection / Speed setting / Time period / Building data (2 marks - 1 per valid input)Mark yourself: how many marks did you get?/ 2 - Question 4H446/022 marks
One decision point in the earthquake simulation program will be to decide if the user inputs are suitable or not. Identify two other example decision points in this program.
Show mark scheme
Which stage to display / What speed to run simulation / Whether simulation has finished / Whether to loop animation / When to show aftershocks (2 marks - 1 per valid decision point)Mark yourself: how many marks did you get?/ 2 - Question 5H446/02 · June 20199 marks
A program is needed to plan the layout of a garden. The programmer is designing the program to make use of caching and re-useable components. Explain and evaluate the use of caching and re-useable components in the design of the garden program.
Show mark scheme
Levels of response (9 marks) Caching: Storing frequently used data for quick access. Garden program could cache: plant images, common layouts, user preferences. Benefits: faster loading, reduced computation. Drawbacks: memory usage, stale data. Re-useable components: Modular code used multiple times. Garden program: plant object class, resize function, positioning tools. Benefits: faster development, consistent behavior, easier maintenance. Drawbacks: may not fit all cases perfectly.Mark yourself: how many marks did you get?/ 9 - Question 6H446/02 · June 20189 marks
Kamran wants to expand a program to handle up to 100,000,000 items and allow searching. Evaluate the use of caching and concurrent processing in this scenario and make a recommendation.
Show mark scheme
Levels of response (9 marks) Caching: Store frequently accessed items in memory. Reduces disk reads. Cache hit = fast access. Consider cache size vs memory. LRU or LFU policies. Concurrent processing: Multiple threads searching simultaneously. Divide data into partitions. Reduces search time. Need to manage thread safety. May have diminishing returns. Recommendation: Use both together for optimal performance. Cache for frequent queries, concurrent processing for large searches.Mark yourself: how many marks did you get?/ 9 - Question 7H446/023 marks
A car racing team uses a car simulator to test their drivers. Identify three inputs that will be required to configure the initial conditions for running the simulation.
Show mark scheme
Track selection / Car model / Weather conditions / Starting position / Fuel level / Tyre type / Driver profile / Time of day (3 marks - 1 per valid input)Mark yourself: how many marks did you get?/ 3 - Question 8H446/024 marks
Describe what is meant by caching and explain how caching can be used within an accident and emergency room simulation to train hospital staff.
Show mark scheme
Caching: Storing copies of frequently accessed data closer to where it's needed / in faster storage (1 mark) Reduces time to retrieve data (1 mark) A&E simulation use: - Cache patient scenarios that are commonly used - Store pre-rendered graphics/animations - Cache frequently used medical data/procedures - Speed up loading of common emergency situations (4 marks - 2 for definition, 2 for application)Mark yourself: how many marks did you get?/ 4
- 1Inputs/outputs: Identify ALL relevant data types for scenario
- 2Preconditions: Must be true before execution; Prevents errors
- 3Caching: Benefits (speed) and drawbacks (stale data, cache misses)
- 4Reusable components: Modularity, reusability, testability, maintainability
- •Practice answering questions under timed conditions
- •Check your answers against the mark scheme carefully
- •Focus on understanding the marking points, not just memorising answers
- •Review past paper questions from multiple years to spot patterns