Algorithm design and problem-solving – IGCSE Computer Science (0478)

199 questions · page 3 of 14 · Clear filters

0 / 0Answer a question to start your score.
Quick quiz (10)Saved 0
Advertisement
31
0478/22/F/M/25 · Question 1Feb/March 2025Paper 221 marks
Loading question…
Question text

1
Tick (✓) one box to complete this sentence.
A standard method of solution used to find a piece of data in an array is a
A
bubble sort.
B
counting routine.
C
linear search.
D
selection search.
[1]

32
0478/22/F/M/25 · Question 3Feb/March 2025Paper 224 marks
Loading question…
Question text

3
Four development life cycle stages and five descriptions are shown.
Draw one line from each stage to the most appropriate description.
Not all descriptions will be used.
Stage
Description
identifying the problem and requirements
testing
reviewing the final solution to suggest further
developments
analysis
making sure the program code works as expected
coding
using structure diagrams, flowcharts and pseudocode to
plan the solution
design
using a programming language to create the solution
[4]
ĬÍĊ®Ġ´íÈõÏĪÅĊßû¸þ×

33
0478/22/F/M/25 · Question 4Feb/March 2025Paper 227 marks
Loading question…
Question text

4
(a) A presence check is a type of validation check.
State the purpose of a presence check.
…
… [1]
(b) A value input into a computer system must be an integer.
(i)
Identify the validation check used to test whether the value input meets this requirement.
… [1]
(ii)
Write the pseudocode for an algorithm to allow a number to be input into an appropriate
variable and check whether the number is an integer. If the number is an integer, it is
accepted. If the number is not an integer, an error message is output. Re-input of the
number is required until a valid number is input.
…
…
…
…
…
…
…
…
…
… [5]
ĬÏĊ®Ġ´íÈõÏĪÅĊßù¸þ×

Advertisement
34
0478/22/F/M/25 · Question 5Feb/March 2025Paper 226 marks
Loading question…
Question text

5
A program is written to only accept data that contains more than 9 characters. The program needs
to be tested. The table, when completed, shows appropriate test data that matches the type of test
data and the purpose of the test data.
Complete the table by inserting the missing information.
Test data
Type of test data
Purpose of test data
…
ABC
…
…
Boundary
…
to make sure that the program accepts data
that is an appropriate length
[6]

35
0478/22/F/M/25 · Question 7Feb/March 2025Paper 2210 marks
Loading question…
Question text

7
This flowchart represents an algorithm.
START
OUTPUT
"Continue?"
INPUT Answer
No
Yes
IS Answer =
'Y' ?
INPUT
Value1
STOP
INPUT
Operator
INPUT
Yes
IS Operator =
Value2
'A' ?
OUTPUT
Value1 +
No
Value2
Yes
IS Operator =
'S' ?
OUTPUT
Value1 –
No
Value2
Yes
No
IS Operator =
'M' ?
OUTPUT
OUTPUT
Value1 *
Value1 /
Value2
Value2
ĬÑĊ®Ġ´íÈõÏĪÅĊàùµþ×
,
,
(a) Complete the trace table for the input data:
Y, 7, S, 9, Y, 5, M, 12, Y, 25, D, 5, N, 10, A, 6
Answer
Value1
Operator
Value2
OUTPUT
[5]
(b) State the purpose of the algorithm on page 6.
… [1]
(c) There are problems with the given algorithm. If the lower-case letter ‘y’ is entered for Answer,
the algorithm stops and if a lower-case letter is entered for Operator, the algorithm gives an
incorrect output.
(i)
Explain how you would change the algorithm to prevent the problems described.
…
…
…
…
…
… [3]
(ii)
Identify one more error related to inputs when the algorithm is run.
…
… [1]
ĬÓĊ®Ġ´íÈõÏĪÅĊàûµþ×

36
0478/21/O/N/24 · Question 1Oct/Nov 2024Paper 211 marks
Loading question…
Question text

1
Tick (✓) one box to show which check is used for verification when data is input.
A
length check
B
range check
C
type check
D
visual check
[1]

37
0478/21/O/N/24 · Question 2Oct/Nov 2024Paper 211 marks
Loading question…
Question text

2
Tick (✓) one box to identify which option is used to show the inputs and output of a Boolean
expression.
A
flowchart
B
trace table
C
truth table
D
variable
[1]

38
0478/21/O/N/24 · Question 4Oct/Nov 2024Paper 213 marks
Loading question…
Question text

4
Identify three stages of the program development life cycle from the following list of words.
analysis
decomposition
design
input
pseudocode
testing
variable
1 …
2 …
3 …
[3]

Advertisement
39
0478/21/O/N/24 · Question 5Oct/Nov 2024Paper 216 marks
Loading question…
Question text

5
Describe three methods that are used to design and construct a solution to a problem.
Method 1 …
…
…
…
Method 2 …
…
…
…
Method 3 …
…
…
…
[6]
ĬÏĊ®Ġ´íÈõÏĪÅĊßü¸þ×

40
0478/21/O/N/24 · Question 9Oct/Nov 2024Paper 218 marks
Loading question…
Question text

9
An algorithm has been written in pseudocode to check if a temperature is in a given range.
The temperature values used in the algorithm are correct.
01 REPEAT
02
OUTPUT "Please enter temperature "
03
INPUT Temp
04
IF Temperature = 999
05
THEN
06
IF Temperature > 38.0
07
THEN
08
OUTPUT "Temperature too high"
09
ENDIF
10
IF Temperature < 35.0
11
THEN
12
OUTPUT "Temperature too low"
13
ENDIF
14
IF Temperature >= 35.0 OR Temperature <= 38.0
15
THEN
16
OUTPUT "Temperature normal"
17
ENDIF
18
ENDIF
19 WHILE Temperature = 999
(a) Identify the line numbers of four errors in the pseudocode and suggest a correction for each
error.
Error 1 line number …
Correction …
…
Error 2 line number …
Correction …
…
Error 3 line number …
Correction …
…
Error 4 line number …
Correction …
…
[4]
ĬÑĊ®Ġ´íÈõÏĪÅĊÞüµĀ×
,
,
(b) Identify the temperature range used.
…
…
… [2]
(c) Complete the trace table for the corrected algorithm using this data:
34.22, 36.1, 37.4, 38.0, 999, –1
Temperature
OUTPUT
[2]
ĬÓĊ®Ġ´íÈõÏĪÅĊÞúµĀ×

41
0478/22/O/N/24 · Question 1Oct/Nov 2024Paper 221 marks
Loading question…
Question text

1
Tick (✓) one box to complete this sentence.
A solution to a problem may be represented using pseudocode, flowcharts or
A
procedures.
B
processes.
C
structure diagrams.
D
sub-systems.
[1]

42
0478/22/O/N/24 · Question 3Oct/Nov 2024Paper 2210 marks
Loading question…
Question text

3
Four flowchart symbols and five purposes are shown.
(a) Draw one line to link each flowchart symbol to its correct purpose.
Not all purposes will be used.
Flowchart symbol
Purpose
subroutine
process
flow
decision
terminator
[4]
ĬÍĊ®Ġ´íÈõÏĪÅĊÝù·þ×
,
,
(b) An algorithm needs to total 50 numbers between 1 and 100 inclusive.
Draw a flowchart that:
•
uses a count-controlled loop from 1 to 50
•
uses an appropriate prompt to ask for a number between 1 and 100
•
totals the numbers as they are entered
•
outputs the total after the loop has completed with an appropriate message.
[6]
ĬÏĊ®Ġ´íÈõÏĪÅĊÝû·þ×

43
0478/22/O/N/24 · Question 5Oct/Nov 2024Paper 224 marks
Loading question…
Question text

5
Analysis is one stage in the program development life cycle.
(a) State one other stage in the program development life cycle.
… [1]
(b) Describe the analysis stage of the program development life cycle.
…
…
…
…
…
… [3]

Advertisement
44
0478/22/O/N/24 · Question 6Oct/Nov 2024Paper 222 marks
Loading question…
Question text

6
Outline one type of verification check that could be used when inputting data.
…
…
…
… [2]
ĬÏĊ®Ġ´íÈõÏĪÅĊßû·Ā×

45
0478/22/O/N/24 · Question 8Oct/Nov 2024Paper 224 marks
Loading question…
Question text

8
Different types of test data are used during program development to make sure a program works
as intended. A program being developed takes as input whole numbers that are not greater than
80.
Identify two items of test data to test the whole number limit of 80.
Explain the reason for your choice of the data in each case.
Test data 1 …
Reason for choice …
…
Test data 2 …
Reason for choice …
…
[4]
ĬÓĊ®Ġ´íÈõÏĪÅĊÞù¶þ×

Advertisement