You are on page 1of 8

Head to savemyexams.co.

uk for more awesome resources

7.5 Identifying Errors


Question Paper

Course CIE IGCSE Computer Science


Section 7. Algorithm design and problem-solving
Topic 7.5 Identifying Errors
Difficulty Medium

Time allowed: 30
Score: /20
Percentage: /100

Page 1 of 8

© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.co.uk for more awesome resources

Question 1a
An algorithm has been written in pseudocode to input some numbers. It only outputs any numbers that are greater than or
equal to 100. The number 999 is not output and stops the algorithm.

INPUT Number
WHILE Numbers <> 999 DO
   IF Number > 100
      THEN
         OUTPUT Number
   ENDIF
ENDWHILE
OUTPUT Number

a)
Identify the four errors in the pseudocode and suggest corrections.

Error 1 .............................................................
Correction ......................................................

Error 2 ..............................................................
Correction .......................................................

Error 3 ..............................................................
Correction .......................................................

Error 4 ..............................................................
Correction .......................................................
[4]
[4 marks]

Page 2 of 8

© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.co.uk for more awesome resources

Question 1b
b)
Write a pseudocode statement to change the corrected algorithm to output all numbers between 100 and 200 inclusive.

You do not need to rewrite the whole algorithm


[2]
[2 marks]

Page 3 of 8

© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.co.uk for more awesome resources

Question 2
This flowchart represents an algorithm.

The array Name[1:4] used in the flowchart contains the following data:

Name[1] Name[2] Name[3]  Name[4]


Jamal  Amir  Eve  Tara

Complete the trace table using the data given in the array.

Flag Count Name[1] Name[2] Name[3] Name[4] Temp


Jamal Amir Eve Tara

Page 4 of 8

© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.co.uk for more awesome resources

[5]
[5 marks]

Question 3
Tick (✓) one box to show the named section of a program that performs a specific task.
A file
B function
C parameter
D process
[1]
[1 mark]

Page 5 of 8

© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.co.uk for more awesome resources

Question 4
A satellite navigation system is an example of a computer system that is made up of sub-systems.

Part of a satellite navigation system:


allows the user to enter details for a new destination or select a previously saved destination
displays directions in the form of a visual map or as a list.
Draw a structure diagram for this part of the satellite navigation system.
[4]
[4 marks]

Page 6 of 8

© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.co.uk for more awesome resources

Question 5
The flowchart represents an algorithm.

The algorithm will terminate if –1 is entered.

Complete the trace table for the input data:

50, 75, 99, 28, 82, 150, –1, 672, 80

Value Diff1 Diff2 OUTPUT

Page 7 of 8

© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.co.uk for more awesome resources

[4]
[4 marks]

Page 8 of 8

© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers

You might also like