Computer Science Class 11 P2 QP
Computer Science Class 11 P2 QP
CAMPUS /
BRANCH NAME
EXAMINATION
DATE
ROLL NUMBER
INSTRUCTIONS
Answer all questions.
Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are
for information only.
Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs.
Write your Campus/Branch Name, Examination Roll Number and Date in the boxes at the
top pf the page.
Write your answer to each question in the space provided.
Do not use an erasable pen or correction fluid.
Calculators must not be used in this paper.
INFORMATION
The total mark for this paper is 50.
The number of marks for each question or part question is shown in brackets [ ].
No marks will be awarded for using brand names of software packages or hardware.
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 1 of 14
Section A
You are advised to spend no longer than 40 minutes answering this section.
Here is a copy of the pre-release material.
DO NOT attempt Tasks 1, 2 and 3 now.
Use the pre-release material and your experience from attempting the tasks before the
examination to answer Question 1.
Pre-release material
A teacher needs a program to record marks for a class of 30 students who have sat
three computer science tests.
Write and test a program for the teacher.
• Your program must include appropriate prompts for the entry of data.
• Error messages and other output need to be set out clearly and understandably.
• All variables, constants and other identifiers must have meaningful names.
You will need to complete these three tasks. Each task must be fully tested.
TASK 2 – Calculate
Calculate the total score for each student and store in the array.
Calculate the average total score for the whole class.
Output each student’s name followed by their total score.
Output the average total score for the class.
TASK 3 – Select
Select the student with the highest total score and output their name and total score
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 2 of 14
1 (a) All variables, constants and other identifiers should have meaningful names.
.........................................................................................................................................[1]
(ii) Declare the arrays to store each student’s marks and total score.
.............................................................................................................................................
.........................................................................................................................................[2]
(b) (i) Show the design of your algorithm to complete Task 1 and Task 2 using
pseudocode, programming statements or a flowchart. Do not include any of the
validation checks in your algorithm.
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.........................................................................................................................................[8]
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 3 of 14
(ii) Comment on the efficiency of your design.
.............................................................................................................................................
.............................................................................................................................................
.........................................................................................................................................[1]
(c) Show two different sets of student data that you could use to check the
validation used in
Set 1
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
Set 2
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
[2]
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 4 of 14
(d) (i) Explain how you select the student with the highest score (Task 3). You may
include pseudocode or programming statements to help illustrate your
explanation.
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.........................................................................................................................................[5]
(ii) How does your program work when there is more than one student having the
highest score? Explain using your method given in part (d)(i).
.............................................................................................................................................
.............................................................................................................................................
.........................................................................................................................................[1]
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 5 of 14
Section B
2 Most programming languages include basic data types. Ahmad is describing the basic
data types he has used.
State the data type that Ahmad is describing in each sentence. Choose the data type
from this list of programming terms.
A number with a fractional part that can be positive or negative and used in calculations
Data type..............................................................................................................................
A whole number that can be positive, negative or zero and used in calculations
Data type..............................................................................................................................
Data type..............................................................................................................................
A sequence of characters
Data type..............................................................................................................................
Data type..............................................................................................................................
[5]
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 6 of 14
3 (a) An algorithm has been written in pseudocode to input the names and marks of 35
students. The algorithm stores the names and marks in two arrays Name[ ] and
Mark[ ].The highest mark awarded is found and the number of students with
that mark is counted. Both of these values are output.
01 HighestMark ← 100
02 HighestMarkStudents ← 0
03 FOR Count ← 1 TO 35
04 OUTPUT "Please enter student name"
05 INPUT Name[Count]
06 OUTPUT "Please enter student mark"
07 INPUT Mark[Counter]
08 IF Mark[Count] = HighestMark
09 THEN
10
11 ENDIF
HighestMarkStudents ← HighestMarkStudents – 1
15 HighestMarkStudents 1 ←
16 ENDIF
17 NEXT Count
18 OUTPUT “OUTPUT "There are ", HighestMarkStudents," with
the highest mark of ", HighestMark
Give line numbers where the four errors are to be found in the pseudocode.
Suggest a correction for each error.
Correction............................................................................................................................
.............................................................................................................................................
Correction............................................................................................................................
.............................................................................................................................................
Correction............................................................................................................................
.............................................................................................................................................
Correction............................................................................................................................
.............................................................................................................................................
[4]
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 7 of 14
(b) Explain how you could extend the algorithm to also find the lowest mark awarded,
count the number of students with that mark, and output both these values.
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.........................................................................................................................................[6]
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 8 of 14
4 This flowchart inputs the points won and the points lost when playing a game. The
difference between the points won and lost is calculated and depending on the result
the player can: move up to the next level, stay at the same level, or move down to the
previous level. The flowchart finishes when the input for points won is –1.
START
INPUT
PointsWon, PointsLost
IS
Ye s END
PointsWon = –1 ?
No
Difference
PointsWon - PointsLost
IS
OUTPUT Yes
Difference > =
"Well done
1000 ?
move up"
No
OUTPUT Yes IS
"Sorry move Difference < 0 ?
down"
No
__________________ OUTPUT
"Keep on trying"
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 9 of 14
(a) Complete a trace table for this set of input data:
5000, 4474, 6055, 2000, 7900, 9800, 3000, 2150, –1, 6700, 7615
[3]
(b) The flowchart needs to be changed. When the difference is more than 5000 the
output message is ‘Fantastic leap up two levels’.
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.........................................................................................................................................[3]
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 10 of 14
5 Arrays are data structures used in programming. Explain what is meant by the terms
dimension and index in an array. Use examples of arrays in your explanations.
Dimension............................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
Index.....................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
.............................................................................................................................................
[3]
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 11 of 14
6 Adatabase table, JUICE, is used to keep a record of cartons of fresh fruit juice available
for sale.
(a) Identify a suitable field to use as the primary key. State a reason for your choice.
Field......................................................................................................................................
Reason..................................................................................................................................
.............................................................................................................................................
[2]
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 12 of 14
(b) Complete the query-by-example grid to display only the stock level and size of all
cartons containing only apple juice.
Field:
Table:
Sort:
Show:
Criteria:
or:
[4]
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 13 of 14
BLANK PAGE
The City School / / Unified Pre-Mock Examination, January 2021 / Computer Science / Paper 22 / Class 11 Page 14 of 14