Algorithm design and problem-solving – IGCSE Computer Science (9–1) (0984)

10 questions

0 / 0Answer a question to start your score.
New quizSaved 0

Quick quiz: 10 random questions from this topic. Answer them all, then open the Summary.

Advertisement
1
0984/22/M/J/26 · Question 3May/June 2026Paper 2211 marks
Loading question…
Question text

3
(a) Identify the type of validation check used in each description.
(i)
A check to make sure that data has been input and not left blank.
… [1]
(ii)
A value placed at the end of a sequence of numbers in the code. The value is calculated
from all the other values before it.
… [1]
(b) Explain the purpose of a format check and give an example of where it could be used.
purpose …
…
…
…
…
example …
…
[3]
© Cambridge University Press & Assessment 2026
,
,
(c) Write the pseudocode for an algorithm to perform a validation check on each number as it is
input, using the following criteria:
•
Input one number at a time.
•
If the number is a whole number, store it in the current element of array Accepted[]
•
If the number is not a whole number, ask for it to be input again until it is a
whole number.
•
When 15 whole numbers have been stored, output a message that states the check has
been completed.
Use appropriate input prompts and output messages to make the requirements clear to
the user.
You do not need to declare any arrays or variables for this algorithm.
…
…
…
…
…
…
…
…
…
…
…
…

2
0984/22/O/N/21 · Question 5Oct/Nov 2021Paper 225 marks
Loading question…
Question text

5
The flowchart represents an algorithm.
The algorithm will terminate if –1 is entered at the List input.
START
← 0
List1
← 0
List2
INPUT
List
IS
Yes
List = –1 ?
No
INPUT
Value
← List1 + Value
Yes
IS
List1
List = 1 ?
No
← List2 + Value
Yes
IS
List2
List = 2 ?
OUTPUT
"List 1 = ", List1
No
OUTPUT
OUTPUT
"Input Error"
"List 2 = ", List2
IS
Yes
List1 > List2 ?
No
OUTPUT
"List 1 is greatest"
OUTPUT
"List 2 is greatest"
END
Complete the trace table for the algorithm using this input data:
2, 77, 2, 16, 1, 35, 2, –7, 5, 18, 1, 11, 1, 12, 2, 20, –1, 18
List
Value
List1
List2
OUTPUT
[5]

3
0984/21/M/J/20 · Question 3May/June 2020Paper 217 marks
Loading question…
Question text

3
Programs can perform validation and verification checks when data is entered.
(a) Give the names of two different validation checks and state the purpose of each one.
Check 1 …
Purpose …
…
…
Check 2 …
Purpose …
…
…
[4]
(b) Give the name of one verification check.
… [1]
(c) Describe the difference between validation and verification.
…
…
…
… [2]

Advertisement
4
0984/21/M/J/20 · Question 2May/June 2020Paper 212 marks
Loading question…
Question text

Tick ( ü ) one box in each row to identify if the statement about structure diagrams is true or false.
2
False
True
Statement
( ü )
( ü )
A structure diagram is a piece of code that is available throughout the
structure of a program.
A structure diagram shows the hierarchy of a system.
A structure diagram is another name for an array.
A structure diagram shows the relationship between different components
of a system.
[2]

5
0984/22/M/J/26 · Question 4May/June 2026Paper 226 marks
Loading question…
Question text

4
The program development life cycle is split into several stages.
Outline what happens during the coding and testing stages of the program development
life cycle.
coding …
…
…
…
…
…
testing …
…
…
…
…
…
[6]
© Cambridge University Press & Assessment 2026
,
,
© Cambridge University Press & Assessment 2026

6
0984/21/M/J/26 · Question 1May/June 2026Paper 211 marks
Loading question…
Question text

1
Tick (3) one box to identify the type of validation check to test whether a number entered into a
computer system is between two set values.
A
length check
B
presence check
C
type check
D
range check
[1]

7
0984/21/M/J/20 · Question 5May/June 2020Paper 216 marks
Loading question…
Question text

5
The flowchart represents an algorithm.
The predefined function DIV gives the value of the result of integer division,
←
9 DIV 4 gives y a value of 2
for example, y
An input value of –1 ends the algorithm.
START
INPUT
Value
IS
Yes
Value =
-1 ?
No
Calc1
Value DIV 2
Calc2
Value DIV 3
IS
No
Calc1 =
Value / 2 ?
Yes
IS
No
Calc2 =
Value / 3 ?
Yes
OUTPUT
Value
END
(a) Complete the trace table for the input data:
50, 33, 18, 15, 30, –1, 45, 12, 90, 6
Value
Calc1
Calc2
OUTPUT
[4]
(b) Describe the purpose of the algorithm.
…
…
… [2]

8
0984/22/M/J/26 · Question 6May/June 2026Paper 227 marks
Loading question…
Question text

6
This flowchart represents an algorithm.
START
INPUT Word
WordLength
LENGTH (Word)
0
Count
1
NumLetter
IS SUBSTRING(Word, NumLetter, 1)
Yes
= SUBSTRING(Word, NumLetter + 1
, 1) ?
Count
Count + 1
No
NumLetter
NumLetter + 1
IS
OUTPUT Count
Yes
No
NumLetter =
WordLength
?
INPUT Choice
Yes
Is Choice =
'Y' ?
No
STOP
© Cambridge University Press & Assessment 2026
,
,
(a) Complete the trace table for the algorithm, using the input data:
post, Y, committee, N, bookkeeper
Note: the first character of each word is in position 1.
Word
WordLength
Count
NumLetter
Choice
OUTPUT
[6]
(b) State the purpose of the algorithm shown by the flowchart.
…
… [1]
© Cambridge University Press & Assessment 2026

Advertisement
9
0984/22/O/N/19 · Question 3Oct/Nov 2019Paper 227 marks
Loading question…
Question text

3
(a) The flowchart checks the lengths of a batch of 10 ropes. For the batch to be accepted 90% of
the lengths need to be between 24.9 and 25.1 metres.
START
Reject
0
Count
0
Yes
Is Count =
10 ?
No
No
Is Reject
Count
Count + 1
<= 1 ?
INPUT Length
Yes
OUTPUT "Batch
rejected"
Is Length <
Yes
25.1 AND
Length > 24.9 ?
No
Reject
Reject + 1
OUTPUT "Batch
accepted"
END
Complete the trace table for the input data:
24.88, 25.01, 24.98, 25.00, 25.05, 24.99, 24.97, 25.04, 25.19, 25.07
Reject
Count
Length
OUTPUT
[4]
(b) (i)
It has been decided to only reject batches of rope that contain ropes that are too short.
State the change required to the algorithm.
…
… [1]
(ii)
Explain how the algorithm to reject batches could be improved to make it more effective.
…
…
…
… [2]

10
0984/22/O/N/19 · Question 5Oct/Nov 2019Paper 224 marks
Loading question…
Question text

5
A programmer writes a program to weigh baskets of fruit in grams, keeping a total of the weight
and counting the number of baskets. The total weight is stored in a variable Total and the number
of baskets is stored in a variable BasketCount.
Explain, including examples of programming statements, how totalling and counting could be used
in this program.
Totalling …
…
…
…
…
…
Counting …
…
…
…
…
…
[4]

Advertisement