Chhetri AcademyGCSE & A level Paper Builder

2.1.1Computational thinking

OCR GCSE Computer Science (J277) · Algorithms and programming (Paper 2) › Algorithms

Practise Computational thinking. 12 exam-style questions on this subtopic, at up to four difficulty levels, with full mark schemes and a progress tracker. Free, no account needed.

Build a paper on this topic

▶ Watch videos on Computational thinking (Craig 'n' Dave OCR on YouTube) · Practise all of Algorithms

Sample questions

Written for this site in the style of OCR exam questions. They are not taken from real past papers.

Question 1Easy3 marks
(a) Which statement best describes abstraction?
Tick (✓) one box.[1]
  • Breaking a problem down into smaller sub-problems
  • Removing unnecessary detail so that only the important parts of a problem are considered
  • Writing the steps needed to solve a problem in a logical order
  • Checking that a program works using a range of test data
(b) State what is meant by decomposition.[1]
(c) Give one benefit of decomposing a problem before writing a program.[1]
Show the answer and mark scheme
(a) Answer: Removing unnecessary detail so that only the important parts of a problem are considered
(b)
  • breaking a (complex) problem down into smaller (more manageable) sub-problems / parts / tasks
(c)
  • each sub-problem is simpler / easier to understand, code or test
  • different sub-problems can be worked on by different programmers (at the same time)
  • the sub-programs produced can be reused (in this or other programs)
  • errors are easier to find / the program is easier to maintain
Question 2Medium5 marks
A leisure centre wants a program that lets members book places on fitness classes online. The programmer uses decomposition to plan the program.
(a) Identify three sub-problems that the programmer could split this problem into.[3]
(b) Explain one way in which decomposition will help the programmer.[2]
Show the answer and mark scheme
(a)
  • logging in / checking the member's username and password
  • displaying the timetable / list of classes
  • checking whether a class has spaces left
  • recording / saving a booking
  • taking payment
  • sending a confirmation (email / message) to the member
  • cancelling a booking
(b)
  • a benefit, e.g. each sub-problem is smaller / simpler / can be tackled one at a time / can be given to different programmers / can be tested separately
  • linked explanation, e.g. so the program is quicker / easier to write / so errors are easier to locate and fix / so modules can be reused
Question 3Hard6 marks
A city council wants a computer model to try out different timings for the traffic lights at a busy crossroads before it changes the real lights.
(a) Describe how abstraction could be used when creating the model.[3]
(b) Describe how decomposition could be used when creating the model.[3]
Show the answer and mark scheme
(a)
  • remove details that do not affect the flow of traffic, e.g. the make / colour of the cars, drivers' names, nearby buildings
  • keep the details that do affect the flow of traffic, e.g. number of vehicles arriving per minute, light timings, number of lanes
  • represent vehicles simply, e.g. as a number in a queue / all the same size and speed
  • this makes the model simpler / quicker to create / quicker to run
  • but enough detail must be kept for the results to be realistic / useful
(b)
  • split the model into smaller parts / modules / sub-programs
  • identifies a suitable part, e.g. controlling the sequence of the lights / generating arriving vehicles
  • identifies a second suitable part, e.g. moving vehicles through the junction / recording queue lengths or waiting times
  • each part can be developed / tested separately / by different people
  • parts can be broken down further until each one is easy to solve

Stuck? Get 1-to-1 help. Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.

Book a free trial