CS Year 10 Practical June 2023
CS Year 10 Practical June 2023
SENIOR SECTION
Year 10
Computer Science-Practical
3 hours
Task Total Mark
Name: Task 1
Task 2
Class :
Task 3
Task 4
Task 5
Total
Instructions:
1. The total mark for this paper is 80.
2. The marks for each question are shown in brackets – use this as a guide as to how much
time to spend on each question.
3. Attempt all questions.
4. Write your answers in the question paper itself.
5. Save your work regularly.
6. Workings should be shown for conversions and calculations.
1. Programmers write code to solve problems.
(1)
(a) Identify the description of a variable in a computer program.
( c) Complete the table by giving an example value for each data type
The first row has been completed for you.
(2)
Data Type Example Value
Integer 14
Char
Real
(d) Describe one difference between the data used in boundary testing and the data
used in erroneous testing.
(2)
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
(1)
………………………………………………………………………………………………………
(3)
(g) A program is needed that will accept the input of a letter and compare it with a
stored letter.
It will check whether the letter comes earlier in the alphabet, later in the alphabet
or is the same letter as the stored letter.
It will output the letter and the stored letter with an appropriate message.
Open Q01g in the code editor.
Amend the code to complete the if statement used to produce the output.
You must use the structure given in Q01g to complete the program.
Do not add any further functionality.
Save your code as Q01gFINISHED with the correct file extension for the
programming language.
(4)
(a) The student has been given a partially completed program to carry out a binary search.
(10)
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
(c ) Describe the steps a linear search algorithm takes to find a search item.
(5)
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
3. A student sells copies of a science textbook to schools.
a program is needed to process textbook orders. It must:
• accept the input of the number of textbooks required
• generate the price per textbook
• generate the total cost of the order
• display the price per textbook and the total cost of the order.
Figure 2
Complete the table by adding the symbol for each letter in the word JANUARY
(7)
Letter J A N U A R Y
Symbol
Figure 2
State whether this set of symbols meets the requirements of a Pigpen cipher.
Justify your answer.
(4)
State
………………………………………………………………………………………………………
Justification
………………………………………………………………………………………………………
……………………………
…………………………………………………………………………
Figure 4
(i) Give the key used in the first stage of the encryption process.
(1)
………………………………………………………………………………………………………
(ii) Give the ciphertext that is produced by the encryption algorithm.
(1)
………………………………………………………………………………………………………
(iii) Give the name of the encryption algorithm that has been used to produce
the ciphertext.
(1)
……………………………………………………………………………………………………
(iv) Explain one reason why the given encryption algorithm is a weak
encryption algorithm.
(2)
………………………………………………………………………………………………………
………………………………………………………………………………………………………
(10 Marks)
Open Q05a in the code editor.
Write the program.
You must use the structure given in Q05a.
Do not add any further functionality.
Save your code as Q05aFINISHED with the correct file extension for the
programming language.
(b) A student wants a program that will calculate the number of fence panels
that require to surround building sites such as the one shown in the diagram (not to
scale)