SPSS 2018 P2
Uploaded by IDKWHYBUTIAM · 3 November 2024
Preview
READ THESE INSTRUCTIONS FIRST Write your name, class, 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. Parent’s Signature : ____________________________ Date: ____________________________ Remarks (if any) : For Examiner’s Use Marks /50 Total % This document consists of 8 printed pages including this page. ST. PATRICK'S SCHOOL PRELIMINARY EXAMINATIONS 2018 SECONDARY 4 EXPRESS NAME CLASS INDEX NUMBER COMPUTING Paper 2 Practical (Lab-based) 7155/02 13 September 2018 2 h 30 min Additional Materials: Electronic version of JOBS.XLSX data file Electronic version of ANALYSIS.PY file Electronic version of ROBOT.PY file Insert Quick Reference Glossary
2 [Turn over 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 the floor division 8. Relational Operators: Operator Notes == equality != real number > >= greater than, greater than or equal to < <= less than, 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 [Turn over 11. Selection Type 1 Type 2 Type 3 if condition(s): <statement(s)> if condition(s): <statement(s)> else: <statem
Content continues in the 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

