QUESTION 1.
4 Four statement types and four examples are shown below.
Draw a line to connect each statement type to the correct example.
Statement type Example
Assignment FOR X 1 TO 10
Iteration READ X
Input PRINT X
Output X Y + Z
[3]
5 A programmer writes a program to store a patient’s temperature every hour for a day.
State the data structure that would be most suitable to use and give the reason for your choice.
Data structure ...................................................................................................................................
Reason ..............................................................................................................................................
......................................................................................................................................................[2]
6 Identify two different selection statements that you can use when writing pseudocode.
1 ........................................................................................................................................................
..........................................................................................................................................................
2 ........................................................................................................................................................
......................................................................................................................................................[2]
© UCLES 2016 0478/22/M/J/16
Buy IGCSE, O / A Level Books, Past Papers & Revision Notes Online at Discounted Prices across Pakistan
Visit: www.TeachifyMe.com / Shop Call / WhatsApp: (0331-9977798)
QUESTION 3. 10
4 Four validation checks and four descriptions are shown.
Draw a line to connect each validation check to the correct description.
Validation Check Description
Range check Checks that some data is entered.
Checks for a maximum number of characters
Presence check
in the data entered.
Checks that the characters entered are all
Length check
numbers.
Checks that the value entered is between an
Type check
upper value and a lower value.
[3]
5 A programmer writes a program to weigh baskets of fruit in grams, keeping a total of the weight
and counting the number of baskets. The total weight is stored in a variable Total and the number
of baskets is stored in a variable BasketCount.
Explain, including examples of programming statements, how totalling and counting could be used
in this program.
Totalling .............................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
Counting ...........................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
[4]
© UCLES 2019 0478/22/O/N/19