Algorithm design and problem-solving – IGCSE Computer Science (0478)
90 questions · page 1 of 6 · Clear filters
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]
Question text
10 (a) Draw a flowchart to input six whole numbers and output the highest. You do not need to
validate the inputs.
START
[6]
© Cambridge University Press & Assessment 2026
,
,
(b) Describe how the flowchart could be changed to only accept positive whole numbers.
…
…
…
…
…
… [3]
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.
…
…
…
…
…
…
…
…
…
…
…
.
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
ĬÏĊ®Ġ´íÈõÏĪÅĊÝü¸Ā×
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
ĬÓĊ®Ġ´íÈõÏĪÅĊÞúµĀ×
Question text
1
Tick (3) one box to complete this sentence.
A standard method of solution used for adding together a set of values during iteration is
A
counting.
B
searching.
C
sorting.
D
totalling.
[1]
Question text
3
(a) Identify the type of test data in each description.
(i)
Data that falls within the accepted parameters of a validation check and is accepted.
… [1]
(ii)
Data that is the highest or lowest value to be accepted.
… [1]
(b) Explain the purpose of a check digit 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 and a verification check
on a new password to meet the following criteria:
1
Input a new password.
2
If the password is less than 10 characters in length, ask for it to be input again until it is
at least 10 characters in length.
3
If the password is at least 10 characters in length, ask for it to be input a second time.
4
If both inputs of the new password match, output a password accepted message.
5
If both inputs of the new password do not match, go back to step 1 and ask for the new
password to be input for the first time.
Use appropriate input prompts and output messages to make the requirements clear to
the user.
Do not declare any arrays or variables for this algorithm.
…
…
…
…
…
…
…
…
…
…
…
…
Question text
5
This flowchart represents an algorithm.
START
PassCount
0
FailCount
0
Count
0
INPUT Size
No
Yes
IS Size <
50.0 ?
PassCount
PassCount + 1
FailCount
FailCount + 1
Count
Count +
1
No
IS Count = 9
?
Yes
OUTPUT "Number
passed: ", PassCount
OUTPUT "Number
failed: ", FailCount
STOP
© Cambridge University Press & Assessment 2026
,
,
(a) Complete the trace table for the algorithm, using the input data:
49.8, 48.7, 62.5, 49.9, 30.0, 58.2, –12.5, 50.0, 26.7, – 49.2, 58.9
PassCount
FailCount
Count
Size
OUTPUT
[5]
(b) Describe how you would change the flowchart to prevent negative numbers from being input.
…
…
…
… [2]
© Cambridge University Press & Assessment 2026
Question text
1
Tick ( ü ) one box to identify the type of test to only check for the largest or smallest acceptable
value.
A
normal test data
B
abnormal test data
C
extreme test data
D
boundary test data
[1]
Question text
2
Four requirements for validating inputs and five types of validation check are given.
(a) Draw one line from each requirement to the most appropriate validation check.
Not all validation checks will be used.
Requirement
Validation check
length check
Date of birth must be between
01/01/1900 and 01/01/2010.
format check
Name has been entered.
range check
Password has exactly 12 characters.
check digit
Student ID must contain 2 letters followed
by a 4-digit number.
presence check
[4]
(b) Identify and describe one verification check that could be applied when a new password is
input into a system.
Verification check …
Description …
…
…
…
[3]
ĬÍĊ®Ġ´íÈõÏĪÅĊßù·þ×
Question text
10 The flowchart represents an algorithm to calculate grades.
START
INPUT
Score
IS Score
Yes
Grade
"C"
>= 40 ?
No
IS Score
Yes
Grade
"B"
>= 60 ?
No
IS Score
Yes
Grade
"A"
>= 80 ?
No
Grade
"D"
OUTPUT "You
achieved a ", Grade
STOP
ĬÑĊ®Ġ´íÈõÏĪÅĊßû¸þ×
,
,
(a) Complete the trace table for the algorithm, using the input data:
21, 46, 63, 91, 12
Score
Grade
OUTPUT
[3]
(b) Explain how the flowchart can be changed to produce the correct output.
…
…
…
…
…
…
…
… [4]
ĬÓĊ®Ġ´íÈõÏĪÅĊßù¸þ×
Question text
1
Tick (✓) one box to complete the description of abstraction.
Abstraction is part of the analysis stage of the development life cycle. Abstraction means
A
testing the solution to the problem.
B
writing a program using program code.
C
defining the sub-systems that make up the problem.
D
removing details from the problem that are not relevant.
[1]
Question text
2
A fence measuring 2 metres in height and 20 metres in length needs painting. The area of the
fence needs to be calculated so that enough paint for the job is purchased.
After the task is decomposed, there are three component parts: input, process and output.
Three component parts and four example descriptions are shown.
Draw one line from each component part to the most appropriate relevant description.
Not all descriptions will be used.
Component part
Description
the height of the fence
the length of the fence
process
The amount of paint required is
40 square metres.
output
the colour of the paint
input
The area of fence is calculated as
40 square metres.
[3]
Question text
3
A range check is used to validate that the input temperature is an integer between –100 and 0,
inclusive.
Suggest suitable normal, abnormal, extreme and boundary test data to test if this validation check
is working correctly.
Normal test data …
Abnormal test data …
Extreme test data …
Boundary test data …
[4]
ĬÍĊ®Ġ´íÈõÏĪÅĊßû¸þ×
Question text
4
(a) State one reason for using a verification check when inputting data.
…
… [1]
(b) Write the pseudocode for an algorithm to perform a double entry verification check, using the
following criteria:
•
Input 10 numbers and store them in the array Numbers[]
•
Input the same 10 numbers again; as each number is input, compare it with its
corresponding number in the array Numbers[]
◦
if the numbers match, move on to the next number
◦
if the numbers do not match, display both numbers and ask for the number to be
re-entered
◦
store the re-entered number in the corresponding array location and move on to the
next number.
•
When all the numbers have been checked, display a message to say the check has
been completed.
You do not need to declare any arrays or variables for this algorithm.
…
…
…
…
…
…
…
…
…
…
…
…
…
…
… [6]
ĬÏĊ®Ġ´íÈõÏĪÅĊßù¸þ×