TSS 2019 P2
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
Task 1 A hospital uses spreadsheet software to generate health reports for each patient who have participated in health screening. You are required to finish setting up the spreadsheet to evaluate the test results for a patient. Open the file HEALTHREPORT.xlsx. You will see the following data. Save the file as MYHEALTH_<your name>_<class>_<index number>.xlsx 1 In cell E3, use an appropriate function to show the current date. [1] 2 In cell E12, enter a formula to calculate the BMI value. The BMI value is calculated by taking the weight of the patient, divided by the square of the patient’s height. This value must be shown in 1 decimal place. [2] 3 In cell E13, use an appropriate function to search for BMI category based on the reference chart at the bottom of the spreadsheet. [1] 4 In cell E15, use a conditional statement to identify the blood pressure category based on the patient’s systolic and diastolic value. The categories can be found in the reference chart at the bottom of the spreadsheet. [2]
2 No part of the paper is to be reproduced without the approval of the Principal of Temasek Secondary School. [Turn over 5 In cell E20, use an appropriate function to calculate the total cholesterol. The total cholesterol consists of both the LDL and the HDL [1] 6 In cell E21, enter a formula to calculate percentage of HDL cholesterol in the total cholesterol. This value must be shown as a percentage in whole numbers. [2] 7 In cell E21, apply conditional formatting such that the font color turns red when the cell value is less than 50 percent. [1] Task 2 The following program prints out the factors of a positive integer, other than 1 and itself. number = int(input("Enter a positive integer: ")) print("Factors of this integer are: ") for factor in range(2, number): if number % factor == 0: print(factor) Open the file FINDFACTOR.py Save the file as FINDFACTOR_<your name>_<class>_<index number>.py 8 Edit the program so that it: (a) Prints out the message "There are a total of X factors." at the end of the program, where X represents the total number of factors. [2] (b) Checks if the input is a positive integer. If it is not, ask the user for input again as necessary. [2] Save your program. 9 Save your program as FINDMULTI_<your name>_<class>_<index number>.py Edit the program such that it: (a) Prints out each factor multiplied by its corresponding factor instead. [3] For example, if the input is 12, the output should be: 2×6 3×4 (b) Has no repetitions in the output. For example, the outputs 2×6 and 6×2 are considered as the same. [3] Save your program.
3 No part of the paper is to be reproduced without the approval of the Principal of Temasek Secondary School. [Turn over Task 3
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

