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

Computational Thinking: Unit Exam A

Instructions

Time allowed
25 minutes
Total marks
25
Calculator
No calculator is permitted.
  • Answer all the questions.

Questions

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.

Think this answer or mark scheme is wrong? Report it

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.

Think this answer or mark scheme is wrong? Report it

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.

Think this answer or mark scheme is wrong? Report it

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.

Think this answer or mark scheme is wrong? Report it

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.

Think this answer or mark scheme is wrong? Report it

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.

Think this answer or mark scheme is wrong? Report it

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.

Think this answer or mark scheme is wrong? Report it

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.

Think this answer or mark scheme is wrong? Report it

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.

Think this answer or mark scheme is wrong? Report it

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.

Think this answer or mark scheme is wrong? Report it

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.

Think this answer or mark scheme is wrong? Report it

Machine mark 0 / 25