ACSBR 2020 Computing P2
ACSBR 2020 Computing P2
SECONDARY FOUR
EXPRESS
COMPUTING
PAPER 2
7155/02
2 HOUR 30 MINUTES
INSTRUCTIONS TO CANDIDATES
All tasks must be done in the computer laboratory. You are not allowed to bring in or take out any
pieces of work or materials on paper or electronic media or in any other form.
The number of marks is given in brackets [ ] at the end of each question or part question.
The total number of marks for this paper is 50.
Task 1
ABC Company uses a spreadsheet to record the car orders and loans from customers.
You are required to finish setting up the spreadsheet to calculate the monthly instalment
for each of the order.
Open the file CARORDERS. You will see the following data.
1 Use an appropriate function to search for the Basic Price of each car model
type in the Model Basic Price table and use it to complete the Basic Price
column. [2]
2 Use a conditional statement to determine the Package Price for each order.
The Package Price costs 0%, 10% and 20% of the Basic Price for Classic, [2]
Deluxe and Luxury packages respectively.
3 Thereafter, calculate the Total Price of the car. The Total Price is the Basic
Price added to the Package Price. [1]
4 Use an appropriate function to calculate the Loan Amount of the car. The Loan
Amount is the loan % of the Total Price. [1]
5 Use an appropriate function to search for the Annual Interest Rate in the Rates
table and use it to complete the Rate column. [2]
7 Use an appropriate function to find out the Numbers sold for each car model in [1]
the Model Basic Price table.
Task 2
The following program allows the weights and heights of 10 students to be input. The
program then computes the body mass index, bmi and output the appropriate output if
the bmi falls outside the acceptable range.
students = 10
upp_bound = 25
low_bound = 18.5
(b) Prints out the message 'Student's weight is normal' when the [2]
bmi falls within the acceptable range of 18.5 to 25 inclusive.
(c) Prints out the number of students that were underweight, as well as the
number that were overweight after all the weights and heights of the [2]
students have been entered.
(a) Tests whether the user has entered a weight from 30 kg to 150 kg [2]
inclusive, and if not, outputs the message 'Invalid weight' and
asks the user for input again as necessary.
(b) Tests whether the user has entered a height from 80 cm to 200 cm [2]
inclusive, and if not, outputs the message 'Invalid height' and
asks the user for input again as necessary.
Task 3
If the name is found in the list, a message is displayed on the screen that states the
corresponding mark in a separate mark list. Otherwise, a message is displayed on the
screen that states the name is not in the list.
There are several syntax errors and logical errors in the program.
items = len(to_find)
num = 0
name_found = False
while name_found == True:
while num > items:
if nlist[num] = to_find
print("{} score {} for the test".format(nlist[num], mlist[num -
1]))
name_found = True
num = num
elif num == items - 1:
print("{} is not in the list".format(to_find))
name_found = False
num = items
else:
num = items
10 Identify and correct the errors in the program so that it works correctly
according to the rules above. [10]
Task 4
You have been asked to create a daily time-in/time-out program for temporary staff.
● Enter the name of temporary staff. There is no need to validate the name.
● Enter the time-in and time-out of the temporary staff in the format of HH:MM. An
example is 08:05
● Ensure that the inputs for time-in and time-out inputs are validated. Only allow for
inputs of 00 to 23 for HH and 00 to 59 for MM. The entry for time-out should be
later than time-in.
● Calculate the total number of minutes worked by each temporary staff
● Repeat this for a total of five temporary staff
● Calculate the average number of minutes worked rounded to 1 decimal place.
● Display this on the screen. Your output must look like this:
Andy
08:05
13:55
Ben
07:03
07:00
eight o'clock
08:00
Charles
10:03
13:115
13:11
Dominic
09-04
09:04
15:35
Ethan
08:42
16:55
Extend your program to calculate the daily wage for each staff.
Extend your program to work for any number of temporary staff. The program [3]
will terminate and outputs when the user enters an empty string for the name.
End of Paper
Preliminary Examination 2020 7 Secondary 4 Express
Computing 7155/02