Level:
Correct: 0
Incorrect: 0
Marks: 0/0
Exam Practice
Course:
Topics:
OCR GCSE Computer Science (Paper 2) Smart practice A mixed round aimed at your weak spots
Unit 1
Algorithms
Unit 2
Programming fundamentals
Unit 3
Producing robust programs
Unit 4
Boolean logic
Unit 5
Programming languages and IDEs
Unit 6
Practical programming (Section B)
Avg
score:
–
Topics
done:
0/31

Computational thinking: abstraction, decomposition and algorithmic thinking

Practise 30 exam-style questions on Computational thinking: abstraction, decomposition and algorithmic thinking for OCR GCSE Computer Science (Paper 2). Write your answer as you would in the exam and get it marked in seconds against the mark scheme, point by point, with the Study Helper on hand if you get stuck.

  • 30 questions
  • 1–6 marks each
  • Instant marking
  • No sign-up needed
20 questions, marked as you go

Sample questions with model answers

Here are 4 of the questions in this topic, each with a model answer, an explanation of why it earns the marks and the mark scheme an examiner would use.

Question 1

1 mark

State what is meant by algorithmic thinking.

Model answer

Algorithmic thinking is identifying the individual steps that are needed to solve a problem, and the order they must be carried out in.

Explanation

Algorithmic thinking is about getting to a solution by working out each step and putting the steps in the right order, so that following them always solves the problem. The result is an algorithm, which can then be written as pseudocode, a flowchart or program code. Writing a program is not the same thing: the steps should be worked out first.

Mark scheme
  1. 1 mark

    Identifying the (individual / logical) steps needed to solve a problem / working out the sequence of steps (an algorithm) to solve a problem

    Accept 'creating a set of instructions/rules that solves a problem'. Do not accept 'writing a program' on its own, or 'thinking like a computer'.

Question 2

2 marks

Explain the difference between an algorithm and a program.

Model answer

An algorithm is a sequence of steps that solves a problem; it can be written in any form, such as pseudocode, a flowchart or plain English. A program is an algorithm that has been written in a programming language so that a computer can run it.

Explanation

The algorithm is the method, and the program is that method written as code. One algorithm can be turned into programs in many different languages. This is why algorithmic thinking comes first: the steps are worked out before any code is written.

Mark scheme
  1. 1 mark

    An algorithm is a set of (step-by-step) instructions / steps to solve a problem (that can be written in any form, e.g. pseudocode, a flowchart or English)

    Accept 'a sequence of steps that solves a problem'.

  2. 1 mark

    A program is an algorithm written in a programming language / code that a computer can run / execute

    Do not accept 'a program is on a computer' on its own.

Question 3

3 marks

Each statement, A, B and C, describes a programmer using a principle of computational thinking.

A: When designing a running app, Priya ignores the colour of the user's trainers and records only the distance and time of each run.
B: Tom works out that to find an average speed, the program must first add up the distances, then add up the times, and then divide the total distance by the total time.
C: A team splits a school website into a news page, a calendar, a parent login and a lunch menu, and gives each part to a different programmer.

State the principle of computational thinking used in each statement.

Model answer

A: abstraction
B: algorithmic thinking
C: decomposition

Explanation

Priya removes a detail that does not matter (the colour of the trainers) and keeps only what she needs, which is abstraction. Tom identifies the steps needed and the order they must happen in, which is algorithmic thinking. The team breaks one big problem into smaller parts that can be worked on separately, which is decomposition.

Mark scheme
  1. 1 mark

    A: abstraction

    Accept 'removing unnecessary detail'.

  2. 1 mark

    B: algorithmic thinking

    Accept 'identifying the steps needed (and their order)' or 'algorithm design'.

  3. 1 mark

    C: decomposition

    Accept 'breaking the problem down into smaller parts'.

Question 4

4 marks

A game stores the scores of 20 players in an array called scores. The scores are whole numbers from 0 to 500.

Describe the steps of an algorithm that finds and outputs the highest score.

You may write your answer in pseudocode, OCR Exam Reference Language, a high-level programming language or structured English.

Model answer

highest = scores[0]
for i = 1 to 19
    if scores[i] > highest then
        highest = scores[i]
    endif
next i
print(highest)

Explanation

The algorithm keeps a 'highest so far' value. It starts with the first score, then looks at every other score in turn, and whenever it finds a bigger one it replaces the highest. Only when the loop has finished is the highest score known, so it is output after the loop. A common error is starting highest at a very large number, which would never be replaced.

Mark scheme
  1. 1 mark

    Sets a variable (e.g. highest) to the first score / to a value no higher than the lowest possible score (e.g. 0 or -1)

    Accept pseudocode, ERL, a high-level language or precise structured English. max 4 from the five points. Setting highest to a large value (e.g. 500) does not earn this mark.

  2. 1 mark

    Repeats for / goes through every score in the array (all 20 / the rest of the scores)

    Accept a for loop from 0 to 19 (or 1 to 19 if highest starts as scores[0]). Do not accept a loop that misses a score.

  3. 1 mark

    Compares each score with the highest so far

  4. 1 mark

    If the score is bigger, replaces / updates the highest with that score

    Accept >= as well as >.

  5. 1 mark

    Outputs the highest after all the scores have been checked / after the loop

    Outputting inside the loop does not earn this mark.

Ready to try the rest? Every answer you write is marked against the mark scheme, so you can see exactly where the marks are.

Study Helper Hints first, answers after you try

Stuck on this one? Ask for a hint and I’ll point you in the right direction, without giving the answer away. Once you’ve checked your answer, I’ll show you how the marks are awarded.