2021 BVSS Computing P2
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
Text from the first pagesBukit View Secondary School Secondary Four Express Preliminary Examination 2021 BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY SCHOOL BUKIT VIEW SECONDARY CANDIDATE NAME CLASS INDEX NUMBER COMPUTING 7155/02 Paper 2 (Lab-based) 14 September 2021 2 hours 30 minutes Additional Materials: Electronic version of STUDYLOAN.xlsx data file Electronic version of SCORES.py file Electronic version of CHECKDIGIT.py file Insert Quick Reference Glossary READ THESE INSTRUCTIONS FIRST Write your name, class and index number in the spaces at the top of this page. Write in dark blue or black pen. 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. For Examiner’s use Marks 50 This question paper consists of 7 printed pages, 1 blank page and 1 insert. Setter: Ms Patricia Lye Parent's Signature:__________________
2 Task 1 Luke wants to take up a $50,000 study loan for his undergraduate studies. The loan is to be repaid over 5 years. He uses spreadsheet software to compare the repayments among 5 different banks. Interest rates stated are per annum but compounded monthly. You are required to finish setting up the spreadsheet. You are required to use the following format for all payments. Open the file STUDYLOAN.xlsx and you will see the following data. Cells B7 to F7 and B20 to D20 are formatted as percentage. Save the file as MYSTUDYLOAN_2021_<your name>_<index number>_<class>.xlsx 1 In cells B8 to F8, enter a formula that uses an appropriate function to calculate the Monthly Payment for each bank. [2] 2 In cells B9 to F9, enter a formula that uses an appropriate function to calculate the Interest Payment (First month) for the first month of the loan for each bank. [2]
3 3 The Total Payment needs to be calculated. On top of paying interest, banks also charge a one-time processing fee which is charged based on the loan amount. In cells B11 to F11, enter a formula that uses an appropriate function to search for Rates (in percentage) in the Processing Fee Rate table. Use it to calculate the Total Payment at the end of the loan. [2] 4 In cell B13, enter a formula that uses an appropriate function to calculate the range of the 5 Total Payment. [1] 5 In cell B14, enter a formula that uses an appropriate function to calculate the mean of the 5 Total Payment. [1] 6 In cells B6 to F6, use a formatting tool to change the colour of the cell to green if the bank offers the lowest total amount Luke would have to pay. [2] Save and close your file. Task 2 begins on the next page.
4 Task 2 The following program requests user to enter a score and then save the score into a list. It will keep looping until the user has no more score to enter. Open the file SCORES.py. Save the file as MYSCORES_2021_<your name>_<index number>_<class>.py 7 Edit the program so that it converts the score input by the user to a float. [1] Save your program. 8 Edit the program to only accept a score between 0 and 100 (inclusive) to be input. A suitable error message must be displayed if the score input is not in this range. The program must loop until a valid score is input. [3] Save your program. 9 Edit the program to only accept "Y" or "N" to be entered when asked if there is another score to be input. A suitable error message must be displayed if an incorrect input is given. The program must loop until the user inputs either "Y" or "N". [3] Save your program. 10 Edit the program to calculate and output the mean score after all the scores have been input. The mean score, formatted to nearest whole number, should be printed together with an appropriate message. [3] Save your program.
5 Task 3 A check digit is a digit or letter added to a sequence of digits to detect errors in manual input. One popular standard for check digits is the 12-digit Universal Product Code (UPC) standard. To calculate the check-digit for UPC standard, we process the first 11 digits by: • adding the digits in the odd-numbered positions (i.e., 1st, 3rd … 11th) • multiplying the result by three • adding together the digits in the even-numbered positions (i.e., 2nd, 4th … 10th) to the result • dividing the result by 10 to find the remainder • subtracting the remainder from 10 to find check digit If the remainder is zero (0), the check digit is 0. The following program uses the UPC standard to calculate the check digit based on the first 11 digits entered by user. It then outputs the check digit, the number of check digits found and repeats the process until the user indicates 'N' when prompted if another check digit needs to be found. There are several logic and syntax errors in the program. Open the file CHECKDIGIT.py. Save the file as MYCHECKDIGIT_2021_<your name>_<index number>_<class>.py 11 Identify and correct the errors in the program. [10] Save your work.
6 Task 4 An anagram is a word formed by rearranging the letters of a different word, using all the original letters exactly once. You have been asked to create an anagram checker. The program must fulfil the following criteria: • Allow player 1 to input a word that will be converted to lower case by the program after entry. The program must ask for another word each time the player’s input is not made up of alphabets. • Allow player 2 to enter an anagram based on player 1’s word. It will be converted to lower case by the program after entry. The program must ask for another word each time the player’s input is not made up of alphabets and if the length of player’s 2 word differs from player’s 1. • Output "XXXXX…X" based on player 2's word. Each "X" should be replaced by the index position of player 1’s word. If a letter is not found in player 1’s word, then it should remain as "X". If a letter in player 1's word has already been used, the same letter’s index cannot be used again. If a letter in player 1’s word appears fewer times than the same letter in player 2’s word, the letter should remain as "X". Examples: o Player 1 input "State" and player 2 input "Taste". The output should be "12034". o Player 1 input "Pastel" and player 2 input "Spaces". The output should be "201X4X". 12 Write your program and test that it works. [13] Save your program as ANAGRAM1_2021_<your name>_<index number>_<class> .py 13 When your program is complete, test it usi
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

