10IGCSE - Test1
10IGCSE - Test1
….………………………………………………………………………..…………………
….………………………………………………………………………..…………………
….…………………………………………………………………………….……………
….…………………………………………………………………………..………………
….……………………………………………………………..…………..…………… [3]
The program will be tested to make sure that it works. There are four types of test data that can
be used to test a system: normal, abnormal, extreme and boundary.
Explain what is meant by normal, abnormal, extreme and boundary test data.
Normal ….……………………………………………………………………….…………
….………………………………………………………………………..…………………
Abnormal ….……………………………………………………………………….………
Page 1 of 4
….………………………………………………………………………..…………………
Extreme ….……………………………………………………………………….………
….………………………………………………………………………..…………………
Boundary ….……………………………………………………………………….………
….……………………………………………………………………….………………[4]
3. The following table contains statements written in pseudocode. Show the type of
programming construct each statement represents. Put a tick (✓) in the appropriate column for
each statement.
The function Rand(X, Y) generates a random integer greater than or equal to X and less than Y.
For example, Rand(1, 4) generates 1 or 2 or 3.
i) Find the four errors in the pseudocode and write a correction for each error.
Error 1 ….………………………………………………….…………………….…………
Correction ….…………………………………………….…………………….…………...
Error 2 ….………………………………………………….…………………….…………
Page 2 of 4
Correction ….…………………………………………….…………………….…………...
Error 3 ….………………………………………………….…………………….…………
Correction ….…………………………………………….…………………….…………...
Error 4 ….………………………………………………….…………………….…………
Correction ….…………………………………………….…………………….…………...
[4]
ii) The pseudocode for this algorithm could be shortened by the use of a FOR … NEXT loop.
….…………………………………………………………………………..………………
….…………………………………………………………………………….……………
….…………………………………………………………………………….……………
….………………………………………………………………………..…………………
….……………………………………………………………..…………..……..……… [3]
iii) Two types of loop that may be found in an algorithm are the ‘pre-condition’ and
‘postcondition’ loop. Identify one other type of loop and explain when it should be used.
Type …………………………………………………………………………………………
Explanation ………………………………………………………………………………….
………………………………………………………………………………………………
….………………………………………...……………………..…………..…………… [2]
5. An algorithm will:
Page 3 of 4
Page 4 of 4