2021 CWSS Computing P2
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
COMMONWEALTH SECONDARY SCHOOL END OF YEAR EXAMINATION 2021 COMPUTING Paper 2 (Practical) Name: _____________________________________ ( ) Class: ___________ SECONDARY FOUR EXPRESS/5 NORMAL (ACADEMIC) Wednesday 1 Sept 2021 7155/2 0800 – 1030 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 5 printed pages including the cover page. [Turn over
2 Task 1 A food delivery company uses spreadsheet software to record each customer order. Serving sizes comes in “Small” and “Large”. Each customer is supposed to purchase only packets of food of the same serving size. You are required to finish setting up the spreadsheet to calculate the cost each customer has to pay. Open the file GOURMET.xlsx and you will see the following data. Save the file as MYGOURMET_<class>_<index_number>_<your name>.xlsx 1. In cells F4 to F21 enter a formula that uses an appropriate function to search for the Packing Charges in the Packing Charges by Number of Packets table. Use it to calculate the Packing Fees for each order. (E.g. a customer who orders between 1 and 4 packs will be charged $0.50 for his order.) [2] 2. Use a conditional statement to identify whether a discount is to be given. For customers who order large serving or where the number of packets is greater than 15, put Yes in the Discount column. [2] 3. Use a conditional statement to calculate the total cost in the Total Cost column. Customer who are identified as Yes for the Discount must be given a 5% reduction for the total cost. [2]
3 4. In cell F25 and F26, enter a formula that uses an appropriate function to count the number of small and large packets of food sold. [2] 5. In cell A4 to H21, use a formatting tool to change the colour of the row to yellow if the Unit Cost is greater than $10. [2] Task 2 The following program allows the user five chances to search for characters within a string. text = "With great power comes great responsibility" chances = 5 for c in range(chances): ch = input("Search character:") for t in text: if ch == t: break Open the file SEARCH.py Save the file as MYSEARCH_<class>_<index_number>_<your name>.py 6. Edit the program so that: (a) For each character that searched, it outputs a suitable message only once at the end of the search if the character is not found in the string. [3] (b) It concatenates all characters that are not found in the string and outputs this new st
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

