JYSS 2018 P2
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
JUNYUAN SECONDARY SCHOOL PRELIM EXAMINATION 2018 SECONDARY FOUR EXPRESS CANDIDATE NAME CLASS INDEX NUMBER COMPUTING 7155/02 Paper 2 (Practical) 26 July 2018 / Thursday 2 hours 30 minutes Additional Materials: 1 x Thumb Drive • Electronic version of TASK1.xls file • Electronic version of TASK2.py file • Electronic version of TASK3.py file READ THESE INSTRUCTIONS FIRST Answer ALL questions. All tasks must be done in the exam venue. 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. This document consists of 6 printed pages and 2 pages of Quick Reference for Python. [Turn over] For Examiner’s Use Task 1 10 Task 2 10 Task 3 10 Task 4 20 Total 50
2 Task 1 Maynot Bank uses a spreadsheet for its customer loan records. You are required to finish setting up the spreadsheet to record the monthly repayment data. Open the file TASK1.xls. You will see the following data. Save the file as LOAN_<Class>_<Index>_<Name>. 1 For the cell range C10:C19, use an appropriate function to extract the first letter of the Customer Code to represent the Loan Type. [1] 2 Use an appropriate function to search for the Interest Rate per Year in the Interest Rate Table given and use it to complete the Interest Rate column. [2] 3 Enter a formula to calculate the simple interest payable by the customers and use it, together with the Loan Amount, to complete the Total Amount of Repayment column. [3] 4 Enter a formula to calculate the monthly amount repayable per customer and use it to complete the Monthly Repayment column. [2] 5 Use a conditional statement, to identify those customers who have undertaken a loan repayment period of more than 3 years and whose application method was online, and put YES in the Free $50 Cash-back column. Otherwise, put NO in the Free $50 Cash-back column. Save and close your file. [2]
3 4E Computing P2 2018 Prelim [Turn over Task 2 The following program accepts the weight in kilograms (kg) for 10 students and prints out the largest weight and the average weight. The weights are in the range of 40 kg to 100 kg. largest = 0 total = 0 student = 10 for i in range(student): weight = float(input("Enter weight of student: ")) if weight > largest: largest = weight total = total + weight average = round(total/student, 1) print("Largest weight is ", largest, "kg") print("Average weight is ", average, "kg") Open the file TASK2.py 6 Edit the program, so that it: (a) Accepts the weight for 40 students. [1] (b) Prints out the smallest weight. [4] (c) Tests if the weight input is between 40 and 100 (both inclusive), and if not, i
Content continues in the PDF.
Related notes
- 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

