Cambridge O Level Computer Science 2210 · 8.1 Programming concepts

Q25 · 2210/22/O/N/23 Q8

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

Q252210/22/O/N/23original Q8Structured · 4 marks
Question 8 from 2210/22/O/N/23

Worked solution

Procedures (give two points):

A procedure lets you write a group of statements under one name [1]

It lets you build a modular program, and the procedure can be re-used in the program or in other programs [1]

Parameters (give two points):

Parameters pass values from the main program into a procedure or function [1]

...so the values can be used inside the procedure, which can then be re-used with different data [1]

Other accepted points: re-use makes programs faster to write and shorter; different programmers can work on different procedures; shorter programs are easier to maintain. Four marks in total.

KEY IDEAProcedures group and reuse code; parameters pass different values into them.
TOTAL 4 marks

Official mark scheme

Mark scheme for 2210/22/O/N/23 question 8
VIDEO
▶ Whole paper

Video solution of the whole paper · by Paper solver.. 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.