Cambridge O Level Computer Science 2210 · 8.1 Programming concepts

Q5 · 2210/22/O/N/20 Q2

Worked solution from the Programming Paper 2 Algorithms, Programming and Logic booklet, Part 1 of 3.

Q52210/22/O/N/20original Q2Structured · 2 marks
Question 2 from 2210/22/O/N/20

Worked solution

(a)

A subroutine is a self-contained block of code that is called from a program. It is not a whole program. Only a function has to return a value.

Statementtruefalse
A subroutine is called from within a program.✓
A subroutine is not a complete program.✓
A subroutine is a self-contained piece of code.✓
A subroutine must return a value to the code from which it was called.✓

All four rows correct [2]

Two correct rows score 1 mark.

KEY IDEAA subroutine is self-contained and called by a program; only a function must return a value.
TOTAL 2 marks

Official mark scheme

Mark scheme for 2210/22/O/N/20 question 2
VIDEO
▶ Whole paper

Video solution of the whole paper · by Quixotic Academy. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.