Marking Scheme Cs GR 10 11 Mockexam Paper2
Marking Scheme Cs GR 10 11 Mockexam Paper2
Marking Scheme Cs GR 10 11 Mockexam Paper2
Page 1 of 21
1. a) Which of the following is an example of a Python string? (1)
☐ A. "Hello"
☐ B. 3.14
☐ C. True
☐ D. 42
Answer :A
☐ C. >=
☐ D. =
Answer:D
Page 2 of 21
d) Open Q01d in the code editor.
The program should calculate the volume of a rectangular swimming pool with a depth of
two metres. The formula for calculating the volume is: volume = length x width x depth.
There are three errors in the code.
Amend the code to correct the errors.
Save your amended code as Q01dFINISHED with the correct file extension for
the programming language. (3)
e) Amna has written a program that display only odd numbers from the given array using for loop.
Open Q01e in the code editor.
Amend the code by adding a suitable comment (you may need to add more than one comment
to a line.
(i) at the end of the line where there is a relational operator (1)
Page 3 of 21
(iii) at the end of the line where selection starts (1)
Save your amended code as Q01eFINISHED with the correct file extension for the programming
language.
Page 4 of 21
Open file Q02a in the code editor.
Amend the code to complete the program.
You must use the structure given in Q02a to write the program.
Do not add any further functionality.
Save your code as Q02aFINISHED with the correct file extension for the programming language.
Page 5 of 21
(10)
Page 6 of 21
b) A merge sort algorithm can be used to sort a list into ascending order.
The list 6,4,8,3,2,9,1,7 needs to be sorted.
Complete the merge sort using the space provided. (5)
6, 4 ,8 ,3, 2, 9,1, 7
1, 2, 3, 4, 6, 7, 8, 9
Page 7 of 21
2 (c) A super market has announced the following discounts on the purchase of items:
Amount Discounts
0-100 No discount
101-200 5%
201-300 10%
Page 8 of 21
(Total for Question 2=21 marks)
Page 9 of 21
3 a) Cerys Jones is the manager of a shop that sells electrical goods.
She is creating a stock control program.
Each item of stock will have a ten-character code.
Each code consists of three parts.
Page 10 of 21
b) Cerys will use functions and procedures in her program.
(i) One similarity between a function and a procedure is that they are both subprograms.
State two other similarities. (2)
Page 11 of 21
(d) Figure 1 shows a Pigpen cipher grid. (3)
Page 12 of 21
Page 13 of 21
(Total for Question 3=13 marks)
4)A program is needed to track the number and health scores of native British trees.
The tree data is stored as structured data. These are implemented as three lists.
The program needs to be amended to meet these requirements:
• construct a record for each type of tree consisting of fields for name, number and
health score
• use commas to separate fields
• write each record to a separate line in an output file.
Page 14 of 21
This is what your final output file should look like.
There are exactly 7 lines in the output file.
Page 15 of 21
(Total for Question 4=7 marks)
5) A circle is cut out of a square of card. A program is needed to calculate the area of the excess
card. The image shows the excess card in light grey.
Page 16 of 21
The required formulae are:
area of a square = s2
diameter of a circle = 2r
area of a circle = πr 2
• s is the length of a single side of the square
• r is the radius of the circle, the distance from the centre to
the edge
• π is the constant Pi. (π=3.14)
The table shows accurate test results for two sets of inputs.
Page 17 of 21
Page 18 of 21
(Total for Question 5=8 marks)
6) In a board game, users build words from letter tiles. Each letter tile has a points value.
There are 107 valid two-letter words.
A program is required to check that each two-letter word placed on the board is valid.
Each valid two-letter word with its points value is stored as a record in the
two-dimensional list, wordTable. The records are stored in alphabetical order.
Open file Q06
Write a program to meet these requirements:
Inputs
Page 19 of 21
• prompt for and accept a two-letter word from the user, AA to ZZ, inclusive
• accept uppercase and lowercase input
• no other validation is required.
Process
• create a linear search to locate the word in wordTable
• stop the search when:
• the word is located
• the expected location of the user’s word is passed
• the end of the list is reached after all words have been checked
• ensure the search works for any length of wordTable
Outputs
• when the user’s word is located, inform the user of the word and the number of points
it scores
• when the expected location of the user’s word is passed, suggest the next
word and the number of points it scores
• when the end of the list is reached after all words have been checked,
suggest the last word in the list and the number of points it scores.
Use comments, white space and layout to make the program easier to read and understand.
Do not add any additional functionality.
Save your amended code as Q06FINISHED. (20)
Page 20 of 21
(Total for Question 6=20 marks)
END OF THE QUESTION PAPER
Page 21 of 21