SQSS 2018 P2 Solution
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
2018 PRELIM COMPUTING P2 NAME: CLASS: INDEX NO: Qn ANSWER: Task 1 1 =TODAY() 2 =YEAR($B$3)-MID(B8,2,4) 3 =VLOOKUP(D8,$B$27:$D$30,2,FALSE)+E8 4 =IF(G8-F8>0,G8-F8,0) 5 =IF(H8>60,"SUSPENDED",IF(H8>30,"WARNING","OK")) 6 Use the following conditional formatting : Task 2 7a lowest_rainfall = 99999 if rainfall < lowest_rainfall: lowest_rainfall = rainfal 7b total_rainfall=0 total_rainfall += rainfall print("Average rainfall for the week is ", round(total_rainfall/num_days,2)) 7c while True: input_str = input("Enter rainfall recorded in mm: ") if input_str.isnumeric()and int(input_str)>=0: break 8 num_days = int(input("Enter number of days: ")) for day in range(num_days): Task 3 9 weight=float(0) height=float(0) bmi=float(0) accepted=0 rejected=10 weight=float(input("Enter weight in kg: ")
2018 PRELIM COMPUTING P2 height=float(input("Enter height in m: ")) while not weight=0 and not height=0: bmi= round(weight/(height * height),1) print("bmi=",bmi) if bmi >= 18.5 or bmi < 22.9: accepted = accepted + 1 else: rejected = rejected - 1 weight=float(input("Enter weight in kg: ") height=float(input("Enter height in m: ")) # print("Total accepted = ", accepted) print("Total rejected = ", rejected) # Task 4 10 Input list of marks saved in variable Validation for 0 to 100 marks Variable for total marks for student Total marks for student updated correctly Average marks calculation Rounding Correct loop for 4 students 11 4 lines of output according to requirements Results are correct 12 A list is used to capture the marks for each subject Correct result 13 Variable to capture number of students Loop for number of students
Content continues in the 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 CPExam Papers · 2024
- CWSS Prelim P1 MSExam Papers · 2024
- CWSS Prelim P1 CPExam Papers · 2024
- BVSS Prelim P1 MSExam Papers · 2024

