Class Index Number Name
MARIS STELLA HIGH SCHOOL
PRELIMINARY EXAMINATION
SECONDARY FOUR
COMPUTING 7155/02
Paper 2 Practical (Lab-based) 29 Aug 2018
2 hours 30 minutes
MARKING GUIDE
For Examiner’s Use
50
This document consists of 5 printed pages.
2
Task 1
Question Answer Marks
1
=VLOOKUP(B4,$F$19:$G$21,2,FALSE)
=VLOOKUP(B5,$F$19:$G$21,2,FALSE)
=VLOOKUP(B6,$F$19:$G$21,2,FALSE)
=VLOOKUP(B7,$F$19:$G$21,2,FALSE)
=VLOOKUP(B8,$F$19:$G$21,2,FALSE)
=VLOOKUP(B9,$F$19:$G$21,2,FALSE)
=VLOOKUP(B10,$F$19:$G$21,2,FALSE)
=VLOOKUP(B11,$F$19:$G$21,2,FALSE)
=VLOOKUP(B12,$F$19:$G$21,2,FALSE)
=VLOOKUP(B13,$F$19:$G$21,2,FALSE)
Question Answer Marks
2
=C4*D4
=C5*D5
=C6*D6
=C7*D7
=C8*D8
=C9*D9
=C10*D10
=C11*D11
=C12*D12
=C13*D13
Question Answer Marks
3 =SUM(E4:E13)
Question Answer Marks
4 =SUMIF(B4:B13,A20,C4:C13)
Question Answer Marks
5 =PMT(B5,B4*12,B3,0,0)
Question Answer Marks
6 =E4*E5*E6
Question Answer Marks
7 =SUM(B4:B6,E7)
Question Answer Marks
8 =IF(B10<0,"Loss",IF(B10=0,"Break Even","Profit"))
3
Question Answer Marks
9 Check for the following two cells:
Total profits per Month $-
Students per Class 15.65950278
Task 2
Question Answer Marks
10 (a) no_of_students = 36
10 (b) shortest = 2.85
if shortest > height:
shortest = height
print("Shortest height of student is ", shortest)
10 (c) while height < 1.2 or height > 2.85:
height = float(input("Re-enter the height of student in
metres(m)between 1.2 to 2.85 : "))
Question Answer Marks
11 no_of_students = int(input("Enter number of students in the
class: "))
4
Task 3
Question Answer Marks
12 negative = []
positives = []
zeros = “”
number = input("Enter an integer(enter q to quit): )
while number <> "q":
num = str(number)
if num < 0:
negatives.append(num)
elif num >= 0:
positives.append(num)
else
zeros += num
number = input("Enter an integer(enter q to quit): )”
print("The numbers were: ")
for n in negatives:
print(negatives[n])
for z in zeros:
print(zeros[z])
for p in positives:
print(positives[p])
corrected lines
negatives = []
zeros = []
number = input("Enter an integer(enter q to quit): ")
while number != "q":
num = int(number)
elif num > 0:
else:
zeros.append(num)
number = input("Enter an integer(enter q to quit): “)
print(n)
print(z)
print(p)
5
Task 4
Question Answer Marks
13 Input ISBN in format 000-0-000-00000-0
Convert input to list of 13 numbers
Variable set up for weighted_sum
Variable set up and initialization of weight
Correct calculation of weighted_sum (1) using a loop (1) to
get through the numbered list
Correct setup (1) and calculation of the derived check digit
(1)
Correct comparison of check digit
Correct format validation of input
Question Answer Marks
14 Test: four lines of output (3 times for 3 different input) (3) (-1
for each line with an error)
output matches stored program
Question Answer Marks
15 Extend: Use of loop to repeat process
Loop condition to check for “q”
Question Answer Marks
16 Extend: call for input for weights
check weights input is correct, 12 digits
loop to handle calculation of new weights
-End of Paper-