Computing Prelim 2018 S4Exp Paper 2 Share with Schools
Uploaded by hima · 11 June 2023
Preview
Text from the first pagesPreliminary Examination (2018) Secondary 4 Express Candidate Name Register No Class COMPUTING Paper 2 Practical (7155 / 02) Date: 28 August 2018, Tuesday Duration: 2 hours 30 minutes READ THESE INSTRUCTIONS FIRST Answer all questions. 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. Programs are to be written in Python. Save your work using the file name given in the question as and when necessary. 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 (10 m) Task 2 (10 m) Task 3 (10 m) Task 4 (20 m) Total (50 m) At the end of the practical exam Number of files submitted : (including the given files) Declared by candidate : _____________________ Signature Verified by teacher : _____________________ Signature This document consists of 7 printed pages Setter : Katrina, Wong Shing Liu Files provided: CARD.py EMPLOYEE.py HOUSELOAN.xls TELEPHONECHARGES.xls
- 2 - 2018 Computing Prelim S4 Express Paper 2 Practical Task 1a (4 marks) A couple uses spreadsheet software to keep track of loans from different banks that will be repaid using a lump sum. You are required to finish setting up the spreadsheet to record the loan details. Open the file HOUSELOAN. You will see the following data. Save the file as LOANLIST_<your_name>_<class>_<index_number>. 1 Use an appropriate function to calculate the amount of payment made at the end of each month and use it to complete the Monthly instalment column. [1] 2 Use an appropriate function to calculate the amount that needs to be paid at the end of the loan period and use it to complete the Lump sum repayment column. [1] 3 Use a conditional statement to indicate if the loan is affordable. The loan is affordable if the monthly instalment is $1500 or less and put YES in the Affordability column. Otherwise put NO in the Affordability column. [2] Save and close your file.
- 3 - 2018 Computing Prelim S4 Express Paper 2 Practical Task 1b (6 marks) A company uses a spreadsheet to keep track of the telephone charges of some users. You are required to finish setting up the spreadsheet to record the telephone charges. Open the file TELEPHONECHARGES. You will see the following data. Save the file as TRACKUSES_<your_name>_<class>_<index_number>. 4 The plan type can be found from the Customer ID. It is the 3 rd character in the Customer ID. Example: Customer ID: 15A0251 Plan type : A Use an appropriate function to extract the plan type and use it to complete the Plan type column. [1] 5 Use an appropriate function to search for the Cost of each minutes after free minutes in the Plan Details table and use it to complete the Total cost before promotion column. [2] [Total cost before promotion = (minutes used – free minutes) x cost of each minutes after free minutes + Basic cost] 6 Enter a formula to calculate the cost after promotion which is the total cost before promotion but is rounded down to the nearest 5 cents and use it to complete the Cost after promotion column. [1] 7 In cell G16 enter a formula to find the 2nd highest Cost after promotion. [1] 8 In cell G17 enter a formula to find the most popular plan type based on the free minutes. [1] Save and close your file.
- 4 - 2018 Computing Prelim S4 Express Paper 2 Practical Task 2 (10 marks) The following program accepts the ages for 15 employees in a company and prints out the oldest age and the average age. The ages are in the range 18 to 55. oldest_age = 0 total_age = 0 employees = 15 for i in range (employees): age = int ( input("Enter the employee's age : ") ) if age > oldest_age: oldest_age = age total_age = total_age + age print ("The oldest age is ", oldest_age) average_age = total_age / employees print ("The average age is ", average_age) Open the file EMPLOYEE.py Save the file as MYSTAFF_<your_name>_<class>_<index_number>. 9 Edit your program so that it: (a) Accepts marks for only 20 employees. [1] (b) Prints out the youngest age as well as the oldest age. [4] (c) Tests if the age input is between 18 and 55, and if not, asks the user for input again as necessary. [3] Save your program. 10 Save your program as VARIEDSTAFF_<your_name>_<class>_<index_number>. Edit your program so that it works for any number of employees. [2] Save your program.
- 5 - 2018 Computing Prelim S4 Express Paper 2 Practical Task 3 (10 marks) The following program should check who is eligible to apply for a child concession card for free rides on public transport using the following rules: • age below seven years • height greater than 0.9 metres • not studying in a Primary School The program calculates the number of children who are eligible for the child concession card and the number rejected. The program finishes when an age of zero or a height of zero is input. The number of children who are eligible for the child concession card and the number rejected are then printed out. There are several syntax errors and logical errors in the program. age = 0 height = float(0) rejected = 0 accepted = 0 age = input("Please enter your age ") height = float(input("Please enter your height ")) priSch=input("Are you studying in a primary school ? Y/N ")) while age <> 0 or height <> 0: if age >= 7 or priSch not in [Y, y] or height < 0.9 : print("You are not eligible to apply") if age >=7: print("because you are 7 years old or more") if priSch not in [Y, y]: print("because you are in a primary school") if height < 0.9: print("because your height is 0.9 metres or below") rejected = rejected + 1 else: accepted = accepted + 1 print("You can apply for the card") height = float(input("Please enter your height ")) priSch=input("Are you studying in a primary school ? Y/N ") print(Accepted, "application(s) eligible to apply") print(Rejected, "application(s) rejected ") Open the file CARD.py Save the file as MYCARD_<your name>_<class>_<index number> 11 Identify and correct the errors in the program so that it works correctly accordingly to the rules above. [10] Save your program.
- 6 - 2018 Computing Prelim S4 Express Paper 2 Practical Task 4 (20 marks) You have been asked to write a program to calculate the average marks scored by each student over four class tests of a particular subject. The program should allow you to: • Enter the data in the format a, b, c, d where a, b, c, d are the marks scored for four class tests by a student. An example is 60, 70, 65, 40 • Only allow data entry of marks ranging from 0 to 100 inclusively where the passing marks are 50 and above • Calculate the total number of passes in the class tests by a student • Repeat this for a total of six students • Find the average marks of a class test, rounded to the nearest whole number • Display this on the screen after each input. Your output must look like this: Student 1 3 pass(es) Student 2 2 pass(es) Student 3 3 pass(es) Student 4 1 pass(es) Student 5 3 pass(es) Student 6 1 pass(es) Average marks 59 12 Write your program and test that it works. [5] Save your program as MARKS1_<your name>_<class>_<index number> 13 When your program is working, use the following test data to show your test results: 60, 40, 55, 50 70, 30, 75, 40 85, 80, 48, 82 35, 46, 45,
Content continues in the PDF. Download PDF
Related notes
- SST (for revision practice) 2024 S3 Computing EOY P2 QP_FinalExam Papers · 2024
- Computing o level notes Notes/Practices · 2023
- BVSS Prelim P1 MSExam Papers · 2024
- BVSS Prelim P1 CPExam Papers · 2024
- CWSS Prelim P1 CPExam Papers · 2024
- CWSS Prelim P1 MSExam Papers · 2024
- computing notesNotes/Practices
- SST 2024 Prelim Paper 1 Ans [revised for 2025] Exam Papers · 2024
- SST 2024 Prelim Paper 1 [revised for 2025] Exam Papers · 2024
- [Notes for Computing] All Definitions/ TermsNotes/Practices · 2025
- [Notes for Computing] Heavily Compressed TextbookNotes/Practices · 2025
- All Computing Terms/DefinitionsNotes/Practices · 2025
- See all Computing notes

