SPSS 2020 Computing P1
SPSS 2020 Computing P1
PATRICK'S SCHOOL
PRELIMINARY EXAMINATIONS 2020
SECONDARY 4 EXPRESS
NAME
CLASS INDEX
NUMBER
COMPUTING 7155/01
Paper 1 Written 20 August 2020
2h
The number of marks is given in brackets [ ] at the end of each question or part question.
You should show all your working.
The total number of marks for this paper is 80.
1 (a) Convert the binary number 0101 1111 into its hexadecimal value.
[1]
(b) Convert the positive whole denary number 462 into a 12-bit binary number.
Answer: [2]
(c) Describe how the hexadecimal number 8A is converted into its denary value. Give the
denary value in your answer.
Description:
2 The following diagram shows five network terms and six descriptions.
[5]
4
1 is_valid = False
2 no_of_users = 0
3 CURRENT_YEAR = 2020
4 WHILE is_valid = False
5 OUTPUT “Enter your birth year: ”
6 INPUT birth_year
7 IF CURRENT_YEAR – birth_year >= 18 THEN
8 is_valid = True
9 no_of_users = no_of_users + 1
10 ENDIF
11 ENDWHILE
(a) The algorithm is tested using the following three numbers as input: 2006, 2000.
[3]
(b) State whether is_valid is a variable or a constant. Give a reason for your choice.
[2]
[1]
1:
2: [2]
5
Identify two other test case conditions that could be used to test the algorithm.
For each condition, give an example of test data for this algorithm.
Test data 1:
4 A government agency has asked your company to create an app for citizens to access all
government services.
• The app will display a menu that lets the user login or register for an account.
• If the user registers for an account, the user must fill up a particulars form.
• If the user logs in, he/she will have to pass a few authentication measures before he/she
can be granted access.
• Once access is given, the user will be able to select a list of government services.
• The user can also access his/her email inbox to view/send messages from/to various
government services.
• The user can log out from the app at any time.
(a) Identify five modules that can be decomposed from the problem.
Module 1:
Module 2:
Module 3:
Module 4:
Module 5:
[5]
6
(b) For the login module, state the input, output and process that are required.
Input:
Output:
Process:
[3]
5 (a) Draw a logic circuit to represent the following Boolean statement. Do not simplify
the statement.
B X
[5]
7
(b) Complete the following truth table for the Boolean statement:
A B C Working space X
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1 [4]
(a) Give three social benefits to the staff of using technology to upgrade their skills.
1:
2:
3:
[3]
(b) One negative impact of using technology in a company is that its sensitive data can be
compromised by cyber-attackers. State two types of cyberattacks.
1:
2: [2]
(c) Describe two ways in which the company can adopt to ensure the security and integrity
of its customers’ data.
1:
2:
[4]
8
7 Alice has a $65 000 loan to buy a car. The loan is repaid over 3 years. The interest rate is 10%
per year. She has a spreadsheet to keep track of the repayments and the amount she owes.
A B C D E
1 Initial Loan $65,000.00 Total Paid to Date $4,194.74
2 Interest Rate 10% Amount Owed $71,310.00
3 Loan Length (months) 36 Number of Payments Made 2
4 Monthly Payment -$2,097.37
5 Total to Pay $75,505.22
6
7 Date Amount
Paid
8 01/01/2020 $2,097.37
9 01/02/2020 $2,097.37
10
(a) Identify the most appropriate data type for the following cell references.
A1:
A8:
B1: [3]
Identify the most appropriate function to use in cell B4, if the interest rate and monthly
payment amount remain the same.
[1]
(c) The cell E1 shows the total amount that Alice has paid to date. The payments are entered
in cells B8 to B43.
[1]
[1]
9
8 This section of program pseudo-code asks user for 100 Body Mass Index (BMI) numbers
between 18.5 and 40. It checks that the numbers are in the correct range, and stores them in an
array. It counts how many of the numbers are larger than or equal to 27.5 and then outputs the
result.
1 count = 0
2 array = []
3 FOR num = 1 TO 100
4 INPUT 'Enter the BMI: ', BMI
5 WHILE BMI = 18.5 AND BMI = 40
6 INPUT 'Out of range BMI. Enter value between 18.5 and 40', BMI
7 ENDWHILE
8 array[100] = BMI
9 IF BMI >= 27.5 THEN count = count + 1
10 NEXT
11 PRINT num, ' BMIs were larger than or equal to 27.5.'
There are three errors in this code. Locate the errors and suggest a correction.
Error 1:
Correction:
Error 2:
Correction:
Error 3:
Correction:
[6]
(b) ……………………………………. stores large amounts of data that will not be lost when
power supply is interrupted.
10 A tuition centre needs a computer program to read in the test scores for 40 students and then
outputs the average test score, the lowest score and the highest score. Each test score is a
whole number between 0 and 100 inclusive.
Write an algorithm, using a flowchart, to take the 40 scores as input and then outputs the
average score, lowest score and highest score. You do not need to validate any data entered.
[6]
11
11 Write an algorithm, using pseudocode, to encrypt the letters of a string based on the position of
the letter in the English alphabet. For example, if “a” is present, change it to “1”; if “b” is present,
change it to “2”. The program should then print the result. You may assume that the input string
only contains lower case English alphabet characters.
[8]
End of Paper