Computer Science 9618/22 — October/November 2022
Cambridge AS Level · Fundamental Problem-solving and Programming Skills · worked solutions for every part, with the mark scheme
Topics Programming · Algorithm Design and Problem-solving · Software Development · Data Types and Structures
Refer to the insert for the list of pseudocode functions and operators.
A programmer is developing an algorithm to solve a problem. Part of the algorithm would be appropriate to implement as a subroutine (a procedure or a function).
State two reasons why the programmer may decide to use a subroutine.
1 ........................................................................................................................................
2 ........................................................................................................................................
A procedure header is shown in pseudocode:
PROCEDURE MyProc(Count : INTEGER, Message : STRING)
Give the correct term for the identifiers Count and Message and explain their use.
Term ..................................................................................................................................
Use ....................................................................................................................................
The algorithm in part (a) is part of a program that will be sold to the public.
All the software errors that were identified during in-house testing have been corrected.
Identify and describe the additional test stage that may be carried out before the program is sold to the public.
Test stage .................................................................................................................................
Description ................................................................................................................................
Part of an identifier table is shown:
| Variable | Type | Example value |
|---|---|---|
| FlagDay | DATE | 23/04/2004 |
| CharList | STRING | "ABCDEF" |
| Count | INTEGER | 29 |
Complete the table by evaluating each expression using the example values.
| Expression | Evaluation |
|---|---|
| MID(CharList, MONTH(FlagDay), 1) | |
| INT(Count / LENGTH(CharList)) | |
| (Count >= 29) AND (DAY(FlagDay) > 23) |
The rest of this paper
6 more questions- Q2Algorithm Design and Problem-solving · Data Types and Structures · Software Development11M
- Q3Data Types and Structures13M
- Q4Algorithm Design and Problem-solving · Programming7M
- Q5Algorithm Design and Problem-solving · Programming4M
- Q6Programming · Software Development11M
- Q7Programming · Data Types and Structures18M