Professional Documents
Culture Documents
b) Which of these statements describes the coding stage of the program development
lifecycle?
Testing of the program to make sure that it works under all conditions
NEXT
PROCEDURE
DECLARE
CASE
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 1
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
[4]
2 a) i) Describe what is meant by validation.
[2]
a) ii) A presence check is a validation check. Give three other examples of validation checks.
[3]
b) Describe, using an example, how verification is used.
[3]
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 2
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
[4]
b) Flowchart
[6]
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 3
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
c) Pseudocode
[6]
4 Choose the correct words to complete this paragraph about creating a maintainable program. Not all
words will be used.
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 4
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
[1]
b) Complete the trace table for the algorithm using this data:
20, 30, 55, 65, -10, -999, 27, 30.5
X Y Z W OUTPUT
[4]
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 5
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
Z
[2]
6 Write an algorithm in pseudocode to input 24 temperature readings into an array. All the readings must
be stored in the array but warnings of “too high” and “too low” must be output if the reading is above
30 or below 20. Use the array Temperature[1:24].
[6]
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 6
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
7 In the following diagram, four descriptions are shown on the left and five statements are shown on the
right.
By drawing lines, connect each description to the appropriate statement(s). Statements might not be
used or could be connected to one or more descriptions.
[4]
8 Read this section of pseudocode that inputs fifty (50) numbers and stores them in an array
StoredNumber[1:50]. Only numbers between 0 and 100 can be stored, all others are rejected.
02 REPEAT
03 INPUT Number
05 StoredNumber[Index] Number
06 Index Index + 1
07 NEXT Number
There are six errors in this code, some lines have more than one error. Locate these errors and suggest a
corrected piece of code for each error.
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 7
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
[6]
9 A database of houses to rent, HouseRent, is to be set up to store the following data:
o Type of House – for example, town house, bungalow and so on
o Number of Bedrooms – for example, 4
o Number of Bathrooms – for example, 2
o Address of House – for example, 94 The Heights
o If there is a garage
o Price per calendar month of rent – for example $250.00
a) Give each field a suitable name and data type, explain why you have chosen each data type.
[6]
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 8
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
b) Identify another field that you could use for the primary key. Give the field an appropriate name
and data type. Show an example and explain why you used that field.
Name:
Data type:
Example:
[4]
c) Complete this SQL script using your field names to display the type of house, address and
price of rent per calendar month of all houses that have a garage.
SELECT
FROM
WHERE
[4]
10 At a traffic intersection there are three lights red (R), orange (O) and green (G). If a light is on then the
input is set to 1, for example R=1 means that the red light is on. Traffic (T) can move only when green is
on, and all other lights are off or both red and orange are on and green is off.
a) Write the logic expression for this problem.
T=
[4]
b) Complete the truth table for this logic expression.
Inputs Working space Output
R O G T
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
[4]
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 9
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
c) Draw a logic circuit for the un-simplified logic expression. Each logic gate must have a
maximum of two inputs.
[6]
11 A times table test will be set up. Before using the test, the user can set the times table to be tested and
the number of questions to be asked. The times tables can be any whole number between 2 and 12
inclusive. The number of questions can be between 5 and 10 inclusive. No questions can be the same in
any test. The name of the user should be displayed with all messages and prompts.
Write and test a program that meets the following requirements:
o Sets up the starting conditions for the test
o During the test:
o displays each question with the question number
o checks if the answer input is correct and displays the right answer if the answer input was
wrong
o adds one to the user’s total every time an answer is right.
o At the end of the test:
o displays the result
o asks the user if they want a retest.
You must use pseudocode or program code and add comments to explain how your code works. All
inputs and outputs must contain suitable messages.
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 10
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 11
© Hodder & Stoughton Ltd 2022
Cambridge IGCSE™ and O Level Computer Science
[14]
Cambridge IGCSE™ and O Level Computer Science Second Edition Study and Revision Guide 12
© Hodder & Stoughton Ltd 2022