Time left25:00 Answered 0 of 11 25 marks
MskProd Year 8 unit exam 25 minutes 25 marks Original paper

Computational Thinking: Unit Exam A

Decomposition, abstraction, pattern recognition and algorithms, flowchart symbols, pseudocode, trace tables and test data.

Instructions

Time allowed
25 minutes
Total marks
25
Calculator
No calculator is permitted.
  • Answer all the questions.
  • The number of marks for each question is shown in brackets. Use it as a guide to how much to write.
  • The clock at the top counts down from the real time allowed. When it reaches zero the paper is locked and marked, as it would be collected in the exam hall.
  • Read every question to the end before answering. Where a question says tick two boxes, tick exactly two: ticking more than asked scores nothing. Type one word and number answers carefully, because they are marked exactly.

Questions

Answer every question, then finish the paper to have it marked. Marking as you go teaches you far less.

25 marks
1Tick one box in each row to show which technique each describes.4 marks
DecompositionAbstractionPattern recognitionAlgorithm design
Breaking a big problem into smaller problems
Removing details that are not needed
Spotting what is the same in different problems
Writing the steps that solve the problem

Tick one box in each row.

Mark scheme0 / 4
  • LBreaking a big problem into smaller problems: Decomposition
  • LRemoving details that are not needed: Abstraction
  • LSpotting what is the same in different problems: Pattern recognition
  • LWriting the steps that solve the problem: Algorithm design
Model answer

Decomposition breaks down, abstraction removes detail, pattern recognition spots similarities and algorithm design writes the steps.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.
2A map of the London Underground leaves out the real distances between stations. Which technique is this?1 mark

Tick one box.

Mark scheme0 / 1
  • LD Abstraction
Model answer

The map keeps only what a passenger needs, the order of stations and the lines, so it is abstraction.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.
3Tick one box in each row to show what each flowchart shape is used for.4 marks
Start or endProcessDecisionInput or output
Rounded rectangle
Rectangle
Diamond
Parallelogram

Tick one box in each row.

Mark scheme0 / 4
  • LRounded rectangle: Start or end
  • LRectangle: Process
  • LDiamond: Decision
  • LParallelogram: Input or output
Model answer

Rounded rectangle for start and end, rectangle for a process, diamond for a decision and parallelogram for input or output.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.
4How many arrows normally leave a decision symbol?1 mark

Tick one box.

Mark scheme0 / 1
  • LB 2
Model answer

A decision has two exits, one for yes and one for no.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.
5(a)Complete the trace table for this algorithm.4 marks
OCR reference language
total = 0
for i = 1 to 4
    total = total + i
next i
print(total)
itotal
1
2
3
4

Mark scheme0 / 4
  • L1
  • L3
  • L6
  • L10
Model answer

total goes 0 + 1 = 1, then 1 + 2 = 3, then 3 + 3 = 6, then 6 + 4 = 10.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.
5(b)What does the algorithm output?1 mark

Mark scheme0 / 1
  • L10
Model answer

After the loop total is 10, which is printed.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.
6A program accepts ages from 11 to 16. Tick one box in each row to show the type of each test value.4 marks
NormalBoundaryErroneous
13
16
abc
11

Tick one box in each row.

Mark scheme0 / 4
  • L13: Normal
  • L16: Boundary
  • Labc: Erroneous
  • L11: Boundary
Model answer

13 is an ordinary valid value, 11 and 16 are at the edges of the range, and abc is the wrong type of data.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.
7What is pseudocode?1 mark

Tick one box.

Mark scheme0 / 1
  • LC A way of writing an algorithm in structured English that looks like code but is not a real language
Model answer

Pseudocode sets out the logic without worrying about any one language's rules.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.
8Explain why decomposition is useful when planning a large program such as a game.2 marks
Explain

Mark scheme0 / 2
  • LSmaller problems are easier to understand and solve
  • LParts can be shared out, worked on separately and tested on their own
Model answer

Breaking a game into parts, such as the player, the enemies, the scoring and the menu, turns one overwhelming problem into small ones that are each easy to solve. The parts can also be shared out within a team and tested separately.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
9What is output when the input is 12?1 mark
OCR reference language
age = input("Age: ")
if age >= 12 then
    print("Allowed")
else
    print("Too young")
endif

Mark scheme0 / 1
  • LAllowed
Model answer

12 >= 12 is true, so Allowed is output.

Marked exactly against the mark scheme. Change it only if an examiner would accept your answer.
10Describe what a trace table is used for.2 marks
Describe

Mark scheme0 / 2
  • LIt records the values of the variables, step by step, as an algorithm runs
  • LTo check what the algorithm outputs or to find errors in it
Model answer

A trace table records the value of every variable after each step as you work through an algorithm by hand. It shows exactly what the algorithm does and outputs, which makes errors easy to find.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
Machine mark 0 / 25
About this paper

This is an original Key Stage 3 assessment. Most questions are closed, so the marking is exact, and the written answers are marked against a mark scheme in the same style as a GCSE paper, so the format is familiar long before it counts.