ZHSS 2018 P2
ZHSS 2018 P2
COMPUTING 7155/02
Paper 2 29 August 2018
2 hours 30 minutes
Write your index number and name on all the work you hand in.
Write in dark blue or black pen on both sides of the paper.
You may use a pencil for any diagrams or graphs.
Do not use staples, paper clips, glue or correction fluid.
You are reminded of the need for clear presentation in your answers.
At the end of the examination, fasten all your work securely together.
The number of marks is given in brackets [ ] at the end of each question or part question.
This question paper consists of 8 printed pages including this cover page.
Task 1
Open the file MEMBERSAVINGS. You will find the following data.
4 In cell D4, use an appropriate function to search for the Special [2]
Discount Rate in the Discount Rates table and use it to
complete the Special Discount Rate column.
2
5 In cell E4, enter a formula to calculate the Cashback Entitlement [2]
for members and use it to complete the Cashback Entitlement
column. Round these values to the nearest whole number.
Open the tab FINANCIAL. You will see the following data.
3
Task 2
The following program accepts timings (mm:ss) for the 2400m running
event, one for each completion of a 400m circuit, for a total of 6 values. It
will print out the average timing and the lowest timing. Timings are in the
range 00:00 to 30:00.
(b) Print out the highest timing entry as well as the average [4]
timing entry.
(c) Test if the timing entry input is between 00:00 and 30:00, if [3]
not, ask the user for input again as necessary.
10 Edit your program so that is works for any number of regular [2]
intervals.
4
Task 3
12 Identify and correct the errors in the program so that it works correctly [10]
according to the rules above.
6
Task 4
14 On inputting 10 names into the data structure, you discover that [1]
data entry can sometimes lead to a mix of uppercase and
lowercase letters entered in a name. Hence, your program
should find a way to ensure that names in the data structure are
stored as uppercase letters.
16 Calculate the name_worth for each name. Using the ORD() [3]
function or otherwise, the number worth of each name is defined
as the sum of each letter, converted to its numerical ASCII
equivalent, after that, the value is multiplied by the position of
the name in the data structure. Please note that the first name
in the data structure is in position 1.
17 For the data structure of 10 names, calculate the score. The [2]
score is the addition of all the name worth values.
Name Worth
-------- ---------
XXXXXXX 9999
YYYYYYY 99999
….
ZZZZZZZZ 9999
Score 999999
MARY
Jane
Lester
WILLIAM
calvIN
Henry
CHArles
JOLIET
COULSON
edison
7
20 Take a screen shot of your report. Name your bitmap file as: [1]