SPSS 2020 Computing P1 Solution
SPSS 2020 Computing P1 Solution
PATRICK'S SCHOOL
PRELIMINARY EXAMINATIONS 2020
SECONDARY 4 EXPRESS
NAME Marking Scheme
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.
(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.
Router
A device responsible for modulation and
demodulation
[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.
It is a variable
A constant is a name with an associated value that usually cannot be changed while the
program is running
[2]
Try again
[1]
1: Length check
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.
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.
(b) For the login module, state the input, output and process that are required.
Process: store username and password in an array. Search the registered users list for a
match. If matches, allow user to go to next page. If not, send error message [3]
5 (a) Draw a logic circuit to represent the following Boolean statement. Do not simplify
the statement.
NOT – 1
OR – 1
NOR – 1
AND – 1
A
NAND – 1
B X
[5]
7
(b) Complete the following truth table for the Boolean statement:
A B C Working space X
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 0 [4]
(a) Give three social benefits to the staff of using technology to upgrade their skills.
1: On the positive side, technology has provided better videos, simulations and collaboration tools
for lessons to be more engaging and relevant to staff. The open sharing of information on the Internet
has made education accessible to all, giving a wider perspective.
[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.
(c) Describe two ways in which the company can adopt to ensure the security and integrity
of its customers’ data.
1: Viruses, worms, spyware and Trojan horses are all examples of malware that need to
run on a user’s computer in order to perform their respective attacks. Anti-virus and
anti-spyware programs can be used to:
• detect when malware is about to be run and stop it from running;
• detect malware that is already running and try to stop it; or
• scan the user’s storage and email to detect and remove malware; if a program has been
infected by a virus, it may also try to restore the original program.
2: Update software regularly so that bugs that were discovered since the last update can be
fixed. This is especially important for software that is used to interact with public networks
such as the Internet, as data from public networks is more likely to be malicious and
designed to take advantage of known bugs.
[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: text
A8: date
Identify the most appropriate function to use in cell B4, if the interest rate and monthly
payment amount remain the same.
=PMT(10%/12,36,65000,0) [1]
(c) The cell E1 shows the total amount that Alice has paid to date. The payments are entered
in cells B8 to B43.
=SUM(B8:B43) [1]
=COUNTA(A8:A43) [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: Line 5
Error 2: Line 8
Error 3: Line 11
Correction: PRINT count, ' BMIs were larger than or equal to 27.5.'
[6]
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.
[Any 6]
[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.
Any 8
[8]
End of Paper