PRELIM CWSS2022 4E_4N Computing P2
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
COMMONWEALTH SECONDARY SCHOOL PRELIMINARY EXAMINATION 2022 COMPUTING Paper 2 (Practical) Name: _____________________________________ ( ) Class: ___________ SECONDARY FOUR EXPRESS/NORMAL (ACADEMIC) Monday 29 August 2022 7155/2 1130 – 1400 2 hour 30 mins READ THESE INSTRUCTIONS FIRST Answer all questions. All tasks must be done in the computer laboratory. 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. Name of setter: Mrs Leong Sai Hong This paper consists of 7 printed pages including the cover page. [Turn over
2 Task 1 Commonwealth Hardware Company uses spreadsheet software to keep track of the amount of bonus given to its employees. Open the file HARDWARE.xlsx and you will see the following data. Save the file as MYHARDWARE_<class>_<index_number>_<your name>.xlsx 1. In cells B6 to B16 enter a formula that uses an appropriate function to generate the username for each employee. The username is created by the first n characters of the member’s name where n is a random number between 1 and the length of the name. For example, for employee, Kelly Lee, her username will be Kel if n is 3. [2] 2. In cells D6 to D16, enter a formula that calculates the number of years of service for each employee. [1] 3. Use an appropriate function to search for the Long service award in the Long service award by year table and use it to complete the Long service award column. [2]
3 4. In cells G6 to G16, enter a formula that uses functions to calculate the bonus each employee is to receive based on the following criteria: Long service award Position Bonus ($) Platinum or Gold Manager 5000 Silver Any 500 Any Any 50 [3] 5. In cells G17 enter a formula that uses functions to find the average amount of bonus given out. The average amount must be rounded to 2 decimal places. [2] Task 2 In Singapore, electronic road pricing (ERP) is implemented on various expressways to regulate traffic. Lately there has been a change in the ERP rates at 5 gantries across some expressways. The following program calculates the change in rates of these 5 gantries. for i in range(5): expressway = input("Enter name of gantry:") old = float(input("Enter old rate:")) new = float(input("Enter new rate:")) change = new - old print("Change is",change) Open the file EXPRESSWAY.py Save the file as MYEXPRESSWAY_<class>_<index_number>_<your name>.py 6. Edit the program so that: (a) It works for any number of gantries. The program must display a suitable input message.
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

