CWSS 2020 Computing P1
CWSS 2020 Computing P1
COMPUTING
Paper 1 (Theory)
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.
[Turn over]
1
2
[5]
Licence Description
Free and Open Source • • Software that is free for use for a
period after which users will need
to pay a fee to continue to use it.
(b) Give one type of causes for data corruption and loss and their corresponding
preventive measures.
(i) Cause
________________________________________________________
________________________________________________________
________________________________________________________
[1]
(ii) Preventive measure
________________________________________________________
________________________________________________________
________________________________________________________
[1]
5
6 A teacher wants to find out how many students in the school came from a certain
primary school and who they are.
Inputs _____________________________________________________________
__________________________________________________________________
__________________________________________________________________
Outputs ___________________________________________________________
__________________________________________________________________
__________________________________________________________________
Processes required __________________________________________________
__________________________________________________________________
__________________________________________________________________
[6]
7 (a) Identify the logic gate represented by the following truth table.
A B X
0 0 1
0 1 0
1 0 0
1 1 0
_____________________________________________________________
[1]
(b) Draw a truth table for a NAND gate.
[1]
6
[6]
7
1 done = FALSE
2 WHILE num1 < num2
3 OUTPUT “Enter first number”
4 INPUT num1
5 OUTPUT “Enter second number”
6 INPUT num2
7 ENDWHILE
8 IF num1 MOD num2 == 0
9 done = TRUE
10 ELSE
11 done = FALSE
12 ENDIF
13 OUTPUT done
(a) num1 and num2 need to be initialised before the above algorithm is run.
State a set of possible values for num1 and num2.
num1 = ______________________________________________________
num2 = ______________________________________________________
[2]
(b) (i) Complete the following trace table for the algorithm.
Use the data 1, 10, 20, 5 as input.
[3]
(d) Once complete, the algorithm is tested with data for boundary conditions.
Identify two other test case conditions that could be used to test the
algorithm.
For each condition, give an example of test data this algorithm.
[4]
9 A source code will need to be translated into machine code before it can be run on
the computer.
(a) Write down one advantage and one disadvantage of using a compiler over
an interpreter to do the translation.
Advantage: ___________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Disadvantage: _________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
[2]
(b) State one example of a programming language that uses an interpreter.
_____________________________________________________________
[1]
9
10 Anna has taken a $10000 study loan. The loan is to be repaid over 5 years. The
interest rate is 5% per year. She has used a spreadsheet to keep track of the
repayments and the amount she owes.
(a) State the type of data that is held in each of the following cells.
A5 ________________________________________________________
B2 ________________________________________________________
E9 ________________________________________________________
[3]
(b) (i) The cell B8 shows the principal payment for the first year.
Identify the most appropriate function to use in cell B8.
________________________________________________________
[1]
(ii) A formula is entered into cell B10 to calculate the total interest paid in
the first year. This formula is then copied and pasted onto cell range
C10:F10 so that the accumulated interest paid for the respective year
can be calculated.
(a) Identify the most appropriate function to use in cell F10.
__________________________________________________
[1]
(b) Write down the absolute cell address that has been used in the
formula in cell F10.
__________________________________________________
[1]
10
12 A pseudo-code algorithm:
• Allows a user to input 10 words and store them in a list.
• Allows the user to input a word to search for
• Outputs a message to show if the word is in the list
• Outputs the number of times the word appears in the list
1 times = 1
2 FOR x = 1 TO 10
3 OUTPUT “Enter a word: ”
4 INPUT words[times]
5 NEXT
6 OUTPUT “Enter the word to search for: ”
7 INPUT search
8 FOR x = 1 TO 10
9 IF words[x] == search
10 times = times - 1
11 ENDIF
12 NEXT
13 IF times >= 0
14 OUTPUT “Found”
15 OUTPUT times
16 ELSE
17 OUTPUT “Not Found”
18 ENDIF
There are four errors in this pseudo-code. Locate the errors and state the correction.
Error 1: _____________________________________________________________
Correction: __________________________________________________________
Error 2: _____________________________________________________________
Correction: __________________________________________________________
Error 3: _____________________________________________________________
Correction: __________________________________________________________
Error 4: _____________________________________________________________
Correction: __________________________________________________________
[8]
12
[7]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Paper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~