Identifying Errors (CIE IGCSE Computer Science)

Topic Questions

1a
Sme Calculator
4 marks

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]
1b
Sme Calculator
2 marks
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]

Did this page help you?

2
Sme Calculator
5 marks

This flowchart represents an algorithm.q7-paper2-spec2023-cie-igcse-computerscience

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  
             
             
             
             
             
             
             
             
             
             
             
             

[5]

Did this page help you?

3
Sme Calculator
1 mark

Tick () one box to show the named section of a program that performs a specific task.

A file box enclose space space space end enclose
B function box enclose space space space end enclose
C parameter box enclose space space space end enclose
D process box enclose space space space end enclose

[1]

Did this page help you?

4
Sme Calculator
4 marks

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]

Did this page help you?

5
Sme Calculator
4 marks

The flowchart represents an algorithm.

The algorithm will terminate if –1 is entered.q5-paper21-june2021-cie-igcse-computerscience

Complete the trace table for the input data:



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

Value Diff1 Diff2 OUTPUT
       
       
       
       
       
       
       
       
       
       
       

[4]

Did this page help you?