SRSS 2019 P2
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
Text from the first pagesThis question paper consists of 11 printed pages including the cover page. [Turn over Name_____________________________________ ( ) Class: Sec ___________ SERANGOON SECONDARY SCHOOL PRELIMINARY EXAMINATION 2019 SECONDARY 4 EXPRESS COMPUTING 7155/02 PAPER 2 3 September 2019 Name of Setter: Mr Adrial Tan 2 hour 30 minutes READ THESE INSTRUCTIONS FIRST Write your name, class and index number on all the work you hand in. Write in dark blue or black pen. Answer all questions. All tasks must be done in the computer laboratory. Programs are to be written in Python. A Quick Reference Glossary for Python is provided. The number of marks is given in brackets [ ] at the end of each question or part question. Retrieve the template files from the COMPEXAM folder in the thumb drive. Save your work inside the COMPEXAM folder in the thumb drive using the file names given in the question as and when necessary. FOR EXAMINER’S USE 50
2 Quick Reference for Python This quick reference shows some examples of the Python language constructs. The complete Python language is not limited to these examples. 1. Identifiers When naming functions, variables and modules, the following rules must be observed: Names should begin with character 'a' - 'z' or 'A' - 'Z' or '_' and followed by alphanumeric characters or '_' Reserved words should not be used. User-defined identifiers are case sensitive. 2. Comments and Documentation Strings # This is a comment """ This is a documentation string over multiple lines """ 3. Input/Output print ("This is a string") s = input ("Instructions to prompt for data entry.") 4. Import import <module> e.g. import math 5. Data Type Data Type Notes int integer float real number bool boolean str string (immutable) list series of values 6. Assignment Assignment Statement Notes a = 1 integer b = c variable d = "This is a string" string mylist = [1, 2, 3, 5, 5] list or array 7. Arithmetic Operators Operator Notes + - plus, subtract * / multiply, divide % remainder or modulus ** exponential or power // quotient of floor division 8. Relational Operators Operator Notes == equality != not equal to > >= greater than, greater than or equal to < <= less then, less than or equal to 9. Boolean Expression Boolean Expression Notes a and b logical and a or b logical or not a logical not 10. Iteration while loop for loop while condition(s): <statement(s)> for i in range(n): <statement(s)> for record in records: <statement(s)>
3 11. Selection Type 1 Type 2 Type 3 if condition(s): <statement(s)> if condition(s): <statement(s)> else: <statement(s)> if condition(s): <statement(s)> elif condition(s): <statement(s)> else: <statement(s)> 12. Built-in functions (a) Basic functions abs( ) chr( ) float( ) input( ) int( ) ord( ) print( ) range( ) round( ) str( ) format( ) (b) Mathematical functions ceil( ) exp( ) fabs( ) floor( ) log( ) max( ) min( ) pow( ) sqrt( ) trunc( ) format( ) (c) String functions endswith( ) find( ) isalnum( ) isalpha( ) isdigit( ) islower( ) isspace( ) isupper( ) len( ) lower( ) startswith( ) upper( ) 13. Reserved Words Reserved words cannot be used as identifiers. They are part of the syntax of the language. False None True and as assert break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield
4 Task 1 Serangoon Public Bank launched a promotional Merdeka Deposit scheme recently. This promotional Merdeka Deposit scheme allows Singapore Citizens from the Merdeka Generation to deposit money with the bank for a fixed period of time with special interest rates. The scheme has the following features: • Deposit amounts from $ 5,000.00 to $ 200,000.00. • Interest rates vary according to deposit amount as follow: o $ 5,000 to $ 10,000, 1.00 % per annum o $ 10,001 to $ 30,000, 1.02 % per annum o $ 30,001 to $ 50,000, 1.05 % per annum o $ 50,001 to $ 75,000, 1.10 % per annum o $ 75,001 to $ 100,000, 1.20 % per annum o $ 100,001 to $ 150,000, 1.35 % per annum o $ 150,001 to $ 200,000, 1.50 % per annum • Flexible deposit tenures ranging from 1 year to 6 years. • Deposit accounts with tenures of 3 years and more are entitled to additional bonus interest as follow: o 3 years, additional 0.1 % per annum throughout entire tenure o 4 years, additional 0.2 % per annum throughout entire tenure o 5 years, additional 0.3 % per annum throughout entire tenure o 6 years, additional 0.4 % per annum throughout entire tenure • Interest payments are compounded yearly and paid up in full only at the end of the deposit tenure. The bank uses spreadsheet software to record the deposits made. You are required to finish setting up the spreadsheet to record the details. Open the file DEPOSIT.XLSX. You will see the following data. Save the file as FIXEDDEPOSIT_<Class>_<Index_Number>_<Your_Name>.xlsx The first two records in the spreadsheet were calculated manually without using formulae and entered into the spreadsheet as the set up of the spreadsheet was not completed. Those two records have been verified to be correct.
5 1 Use an appropriate function to search for the Interest Rate in the Rates Table and use it to complete the Base Merdeka Deposit Interest Rate column. [2] 2 Use a conditional statement to complete the Additional Bonus Interest column using the features described for the Merdeka Deposit scheme. [2] 3 Enter a formula to calculate and complete the Total Interest Rate column. The value in the Total Interest Rate column can be found by adding the values in the Base Merdeka Deposit Interest Rate and Additional Bonus Interest columns. [2] 4 Enter a formula using yearly compounded interest to complete the Amount Received At Maturity column. [2] 5 In cell C26, enter a formula to calculate the total deposits collected by the bank. [1]
6 6 In cell C27, enter a formula to count the number of deposits that are worth at least $ 100,000.00. [1] Save and close your file. Task 2 begins on the next page.
7 Task 2 The following program accepts the shuttle run timings of 40 students, calculates the average timing and prints out the average timing. total = 0 for count in range(40): timing = float(input("Enter shuttle run timing (s) : ")) total = total + timing average = total/40 print("Average shuttle run timing is {} s".format(average)) Open the file TIMINGS.py Save the file as TIMINGS_<Class>_<Index_Number>_<Your_Name>.py 7 Edit your program so that it: (a) accepts timing inputs for 20 students. [1] (b) whenever a timing that is being input is faster than any previous timing entered, the system will output the message “This is a new record timing!”. [4] [Note: the message should be displayed when the first timing in entered.] (c) tests if the timing input is between 0 and 30 inclusive, and if not, asks the user for input again as necessary. [3] Save your program. 8 Save your program as VARTIMINGS_<Class>_<Index_Number>_<Your_Name>.py Edit your program so that it works for any number of timings. [2] Save your program.
8 Task 3 The following program should check which student is eligible for the job attachment programme using the following rules: ● age must be at least sixteen years ● age not more than eighteen years ● proficiency test score must be at least 60. The program calculates the number of students who are eligible for the job attachment programme and the number rejected. When a student is rejected, all the reason(s) for rejection will be printed. The program finishes when an age of zero or a score of zero is input. The number of students who are eligible for the job attachment and the number rejected are then printed out. There are several syntax errors and logical errors in the program. age = 0 rejected = 100 Eligible = 0 age = int(input("Please enter stu
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 CPExam Papers · 2024
- BVSS Prelim P1 MSExam Papers · 2024
- CWSS Prelim P1 CPExam Papers · 2024
- CWSS Prelim P1 MSExam Papers · 2024
- computing notesNotes/Practices
- SST 2024 Prelim Paper 1 [revised for 2025] Exam Papers · 2024
- SST 2024 Prelim Paper 1 Ans [revised for 2025] Exam Papers · 2024
- [Notes for Computing] Heavily Compressed TextbookNotes/Practices · 2025
- [Notes for Computing] All Definitions/ TermsNotes/Practices · 2025
- (Notes) Heavily Compressed TextbookNotes/Practices · 2025
- See all Computing notes

