Worked solution from the Programming Paper 2 Algorithms, Programming and Logic booklet, Part 1 of 3.
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.
| Statement | true | false |
|---|---|---|
| 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.
▶ 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.