SPSS 2018 P2 Solution
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
Name: ________________________ Class: ___________ Sec 4 Computing Prelim 2018 Paper 2 Task 1 1 Saved as MYJOBS_<Class>_<Class_Index_Number>_<Your_Name> 2 =RIGHT(D4,2) Propagate for whole column 3 =VLOOKUP(E4,$B$18:$C$23,2,FALSE) + (F4*G4) Propagate for whole column 4 Conditional Formatting blue background for total cost above $50 5 =COUNTIF($C$4:$C$13,E18) Output: 4,1,1,2,1,1 (1 mark for every 3 correct formula) 6 Total Cost in bold in G14 =SUM(H4:H13) in H14 Subtotal: Task 2 7a Correct code for largest digit and correct output and printing of output 7b Correct code for copying uppercase letters Correct output and printing of uppercase letters in a list 7c Correct testing of user input for 6 characters in length Ask user for input again Display suitable error message 8 Saved as as VARANALYSIS_<Class>_<Class_Index_Number>_<Your_Name> Correct code for calculating total Correct code for calculating average Correct output and printing of average Subtotal:
Task 3 9 import math #1m or they use power 0.5 number_steps = 0 #1m current_location = [0,0] print("Current location: ", current_location) while True: direction = input("Enter the direction (up, down, left, right). Type exit to end: ") if direction == "exit":#1m break#1m else: number_steps = int(input("Enter the number of steps to move: "))#1m if direction == "up":#1m current_location[1] += number_steps elif direction == "down": current_location[1] -= number_steps elif direction == "left": current_location[0] -= number_steps#1m elif direction == "right":#1m current_location[0] += number_steps#1m print("\nCurrent location: ", current_location) print("Distance travelled: ", round(math.sqrt(current_location[0]**2 + current_location[1]**2),2))#1m Subtotal: 10 10 Initialise counter variables with suitable data types Use of for / while loops correctly Obtains (7 valid sets of) user input Manipulation of input data to retrieve ages (e.g. string slicing / list.split()) Type forcing of input to float Validates input are floats and ensures valid input Validates input are between 40 and 70 (inclusive) and ensures valid input Calculates average category timing correctly Rounds off average age to nearest year (e.g. round() / int() / % / //) Print timings to 2 decimal places (e.g. using print formatting) Q10 SUBTOTAL 11 Category & Ave Timing printed correctly & accurately (excludes rounding inaccuracies, includes tabs, spelling & caps)
Champion & Champ Timing printed correctly & accurately (excludes rounding inaccuracies, includes tabs, spelling & caps) Medley block printed accurately & correctly (excludes rounding inaccuracies, includes tabs, spelling & caps) Q11 SUBTOTAL 12 Validation of input should account for “-“ Account for varying denominators in finding average category timings Account for lack of medley timing when a swimmer fail
Content continues in the PDF.
Related notes
- Computing o level notes Notes/Practices · 2023
- BVSS Prelim P1 CPExam Papers · 2024
- CWSS Prelim P1 CPExam Papers · 2024
- CWSS Prelim P1 MSExam Papers · 2024
- BVSS Prelim P1 MSExam Papers · 2024
- computing notesNotes/Practices

