MID–YEAR EXAMINATIONS
YEAR 8
MARCH 2020
Subject: Computer Science Syllabus Code: 0478
Date of Exam : _______________________________________ Time : 1 hour
Student Name : _______________________________________ Class : _______________
MATERIALS REQUIRED FOR EXAM: Blue or black pen, pencil, eraser and ruler.
READ THESE INSTRUCTIONS FIRST:
If you have been given an Answer Booklet, follow the instructions on the front cover of the
Booklet.
Write in dark blue or black pen.
You may use a soft pencil for any drawings, diagrams and graphs.
Do not use staples, paper clips, highlighters, glue or correction fluid.
Answer all questions.
The number of marks is given in brackets ( ) at the end of each question.
The total number of marks for this paper is 80.
This document consists of 11 printed pages including the front cover.
[Turn over]
MID_YEAR_EXAMINATIONS_COMPUTER SCIENCE_YEAR8_ MARCH_2020 _USHA Page 1
MID_YEAR_EXAMINATIONS_COMPUTER SCIENCE_YEAR8_ MARCH_2020 _USHA Page 2
1 Computational thinking is a problem solving process. This means it is a set of steps we can take to
solve a problem. Tick ((✓) to show if the statement is True or False.
True False
Statement
(✓) (✓)
Computational thinking helps us understand a problem.
Computational thinking breaks it down into a smaller part.
Computational thinking work out what is important and find a
solution.
[3]
Fill in the blanks using the answers in box.
algorithm Iteration decomposition solve
Selection recognition pattern sequencing
2 An ………………………………………… is set of instructions or rules that we create out a task.
3 ……………………………………………………….. is the order of the instructions in an algorithm.
4 ………………………………………………………… happens when you reach a step in the algorithm where
there are two or more possibilities.
5 ……………………………………………. Is repeating a step or task in an algorithm or computer program.
6 Pattern ……………………………………….. is finding the similarities and differences between items. We
use pattern recognition to find the right algorithms to ………………………………. a particular problem.
7 ……………………………………………..to break down a problem into smaller parts.
[7]
MID_YEAR_EXAMINATIONS_COMPUTER_SCIENCE_YEAR8_ MARCH_2020 _USHA Page 3
8 Imagine you are programming a robot to hammer a nail into a piece of wood. Design a flowchart
to show what happens when the robot hammers the nail into a surface.
[7]
9 Using pseudocode is good way of learning to write algorithms. Write the purpose for each of the
parts.
Decomposed
Efficient
MID_YEAR_EXAMINATIONS_COMPUTER_SCIENCE_YEAR8_ MARCH_2020 _USHA Page 4
Correct
Elegant
[8]
10 Pseudocode and flowcharts use similar tools to give instructions, and show selections and
iterations. Pseudocode using REPEAT look like this:
Align hammer with nail
REPEAT
Hit nail with hammer
IF nail fully in word
THEN stop
Go back to REPEAT
Write the above pseudocode in another way using WHILE.
[6]
MID_YEAR_EXAMINATIONS_COMPUTER_SCIENCE_YEAR8_ MARCH_2020 _USHA Page 5
11 This OUTPUT instruction would look like this in pseudocode:
Align hammer with nail
WHILE nail fully in wood
Hit nail with hammer
OUTPUT “Job done”
Draw a flowchart for the above pseudocode.
[6]
MID_YEAR_EXAMINATIONS_COMPUTER_SCIENCE_YEAR8_ MARCH_2020 _USHA Page 6
12 Make a program to add two numbers together. You need two variables to store these numbers.
Set the variables as number1 and number2.
print ( “ ************************”)
print (“ Welcome to the TOTALISER”)
print (“This program will add two numbers together”)
[6]
MID_YEAR_EXAMINATIONS_COMPUTER_SCIENCE_YEAR8_ MARCH_2020 _USHA Page 7
13 Make a program to calculate the total of ten numbers. The program will use a counter – controlled
loop.
[10]
MID_YEAR_EXAMINATIONS_COMPUTER_SCIENCE_YEAR8_ MARCH_2020 _USHA Page 8
14 Make a program to multiply two numbers. You need two variables to store these numbers. Set the
variables as number1 and number2.
print (“ ************************”)
print (“Welcome to the MULTIPLER”)
print (“This program will multiply two numbers together”)
[6]
15 A list is shown in square brackets. Here is command that initialize a list:
ColourList = [ “Black”,”White”,”Grey”,”Violet”]
(i) List for 3 elements.
…………………………………………………………………………………………………………………………………………………………
(ii) List for 2 elements.
…………………………………………………………………………………………………………………………………………………………
(iii) List for 6 elements.
…………………………………………………………………………………………………………………………………………………………
[6]
MID_YEAR_EXAMINATIONS_COMPUTER_SCIENCE_YEAR8_ MARCH_2020 _USHA Page 9
16 The program uses a condition – controlled loop.
(a) This program has three variables. List the 3 variables:
(i) …………………………………………………………………………….
(ii) …………………………………………………………………………….
(iii) …………………………………………………………………………….
[3]
(b) If the input number is 10. What will the Python compiler generate for the OUTPUT?
[3]
MID_YEAR_EXAMINATIONS_COMPUTER_SCIENCE_YEAR8_ MARCH_2020 _USHA Page 10
17 Look at the list and then answer the questions.
CityList = [ “ Los Angeles”, “Alamenda”, “San Bernardino”, “Athens”, “Cairo” , “Madrid”]
a. How many elements are there in this list?
………………………………………………………………………………………………………………………………………………
b. Write the command to print out the first element in the list.
…………………………………………………………………………………………………………………………………………………
c. If you gave this command what would be printed out? print (CityList[3])
…………………………………………………………………………………………………………………………………………………
d. If you gave this command what would be an error? Why ? print (CityList[7])
…………………………………………………………………………………………………………………………………………………
[4]
18 A list is made of elements. This program shows a list of fruits.
What will the Python compiler generate for the OUTPUT?
[3]
MID_YEAR_EXAMINATIONS_COMPUTER_SCIENCE_YEAR8_ MARCH_2020 _USHA Page 11
19 The MIT app used to make a game. This is the designer view.
Tick (✓) for the correct procedure of the blocks if the smartphone triggered.
[3]
END OF THE QUESTIONS PAPER
MID_YEAR_EXAMINATIONS_COMPUTER_SCIENCE_YEAR8_ MARCH_2020 _USHA Page 12