SRSS 2019 P2 Solution
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
Text from the first pages1 Marking Scheme for COMP Prelim Practical Exam P2 2019 Name : ______________________________ Class: _______ No Description 1. One mark for working top formula, one mark for rest =VLOOKUP(B7,$E$29:$G$35,3,TRUE) =VLOOKUP(B8,$E$29:$G$35,3,TRUE) =VLOOKUP(B9,$E$29:$G$35,3,TRUE) =VLOOKUP(B10,$E$29:$G$35,3,TRUE) =VLOOKUP(B11,$E$29:$G$35,3,TRUE) =VLOOKUP(B12,$E$29:$G$35,3,TRUE) =VLOOKUP(B13,$E$29:$G$35,3,TRUE) =VLOOKUP(B14,$E$29:$G$35,3,TRUE) =VLOOKUP(B15,$E$29:$G$35,3,TRUE) =VLOOKUP(B16,$E$29:$G$35,3,TRUE) =VLOOKUP(B17,$E$29:$G$35,3,TRUE) =VLOOKUP(B18,$E$29:$G$35,3,TRUE) =VLOOKUP(B19,$E$29:$G$35,3,TRUE) =VLOOKUP(B20,$E$29:$G$35,3,TRUE) =VLOOKUP(B21,$E$29:$G$35,3,TRUE) =VLOOKUP(B22,$E$29:$G$35,3,TRUE) =VLOOKUP(B23,$E$29:$G$35,3,TRUE) =VLOOKUP(B24,$E$29:$G$35,3,TRUE) 2. One mark for working top formula, one mark for rest =IF(C7>2,(C7-2)*0.1%,0) =IF(C8>2,(C8-2)*0.1%,0) =IF(C9>2,(C9-2)*0.1%,0) =IF(C10>2,(C10-2)*0.1%,0) =IF(C11>2,(C11-2)*0.1%,0) =IF(C12>2,(C12-2)*0.1%,0) =IF(C13>2,(C13-2)*0.1%,0) =IF(C14>2,(C14-2)*0.1%,0) =IF(C15>2,(C15-2)*0.1%,0) =IF(C16>2,(C16-2)*0.1%,0) =IF(C17>2,(C17-2)*0.1%,0) =IF(C18>2,(C18-2)*0.1%,0) =IF(C19>2,(C19-2)*0.1%,0) =IF(C20>2,(C20-2)*0.1%,0) =IF(C21>2,(C21-2)*0.1%,0) =IF(C22>2,(C22-2)*0.1%,0) =IF(C23>2,(C23-2)*0.1%,0) =IF(C24>2,(C24-2)*0.1%,0) 3. One mark for working top formula, one mark for rest =D7+E7 =D8+E8 =D9+E9 =D10+E10 =D11+E11 =D12+E12 =D13+E13 =D14+E14 Task1 (10) Task2 (10) Task3 (10) Task4 (20) Total (50)
2 =D15+E15 =D16+E16 =D17+E17 =D18+E18 =D19+E19 =D20+E20 =D21+E21 =D22+E22 =D23+E23 =D24+E24 4. One mark for working top formula, one mark for rest =FV(F7,C7,0,B7) =FV(F8,C8,0,B8) =FV(F9,C9,0,B9) =FV(F10,C10,0,B10) =FV(F11,C11,0,B11) =FV(F12,C12,0,B12) =FV(F13,C13,0,B13) =FV(F14,C14,0,B14) =FV(F15,C15,0,B15) =FV(F16,C16,0,B16) =FV(F17,C17,0,B17) =FV(F18,C18,0,B18) =FV(F19,C19,0,B19) =FV(F20,C20,0,B20) =FV(F21,C21,0,B21) =FV(F22,C22,0,B22) =FV(F23,C23,0,B23) =FV(F24,C24,0,B24) 5. =SUM(B5:B24) 6. =COUNTIF(B5:B24,">=100000") 7. a) for count in range (20): b) # initialized before for loop fastest = 99999 # within for loop, after timing input is received if timing < fastest: fastest = timing print("This is a new record timing!")
3 c) # within for loop, immediately after timing input is received while timing<0 or timing>30: print("Invalid timing entered.") timing = float(input("Enter shuttle run timing (s) : ")) 8. # initialized before for loop n = int(input("Enter number of timings to record: ")) # modify conditions of for loop for count in range (n):
4 9. age = 0 rejected = 100 Eligible = 0 age = int(input("Please enter student's age: " ) result = float(input("Please enter proficiency test score: ")) while age != 0 or result != 0: if age < 16 or age > 18 or result < 60 if age < 16: print("Age must be at least sixteen years.") elif age < 18: print("Age must not be more than eighteen years.") if result < 60: print("Proficiency test score must be at least 60.") rejected = rejected - 1 print("Student is NOT eligible for job attachment programme.") else: print("Student is eligible for job attachment programme.") eligible = eligible + 1 age = int(input("Please enter student's age: " )) result = float(input("Please enter proficiency test score: ")) print("Number of students eligible: " eligible) print("Number of students rejected: ", rejected) Corrected lines rejected = 0 eligible = 0 age = int(input("Please enter student's age: " )) while age != 0 and result != 0: if age < 16 or age > 18 or result < 60: elif age > 18: rejected = rejected + 1 else: # increase indentation to 1 tab age = int(input("Please enter student's age: " )) # reduce indentation to 1 tab print("Number of students eligible: ", eligible) OR print("Number of students eligible: " + str(eligible))
5 10. input locking password and unlocking password validation of locking password (6 characters long) …… and outputs an error message if invalid and continuously request for another locking password …… or a success message if valid checks if the locking password matches the unlocking password ……and outputs appropriate message if they match if unlocking password does not match locking password: ……appropriate algorithm is used to check if wrong password has been entered, and request for an unlocking password again up to 3 times ……outputs the appropriate message if wrong password entered less than 3 times ……outputs the appropriate message if wrong password entered 3 times (or more) ……outputs the appropriate message if correct password entered subsequently 11. Test 1: output of the following messages in bold are shown: Enter password to lock: 53423 Invalid password. Enter password to lock: Test 2: output of the following messages in bold are shown: Enter password to lock: 534237 Safe is locked. Unlock with the same password. Enter password to unlock safe: 534237 Safe is unlocked. Test 3: output of the following messages in bold are shown: Enter password to lock: 534237 Safe is locked. Unlock with the same password. Enter password to unlock safe: 732435 Wrong Password. Enter password to unlock safe: 534237. Safe is unlocked. Test 4: output of the following messages in bold are shown: Enter password to lock: 534237 Safe is locked. Unlock with the same password. Enter password to unlock safe: 732435 Wrong Password. Enter password to unlock safe: 732435. Wrong Password. Enter password to unlock safe: 732435. Exceeded maximum tries. Please contact concierge to unlock. 12. Extend: use of while loop
6 ……input for re-entered password ……checks if re-entered password matches the password …………outputs the appropriate message when passwords don’t match 13. Extend : use of while loop ……repeatedly requests for new locking password after safe is unlocked Total
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

