0% found this document useful (0 votes)
284 views

Computer Science Class 11 P2 QP

The document is a pre-mock examination for computer science class 11. It provides instructions for a 3 section problem involving recording marks for 30 students across 3 tests. Section 1 involves setting up arrays to store student names and marks. Section 2 calculates total scores and averages. Section 3 selects the highest scoring student. Question 1 asks the candidate to (a) declare arrays for names and marks, (b) design an algorithm for sections 1-2 using pseudocode, and (c) provide validation test data and explain how to select the highest score.

Uploaded by

Muaarij Haider
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
284 views

Computer Science Class 11 P2 QP

The document is a pre-mock examination for computer science class 11. It provides instructions for a 3 section problem involving recording marks for 30 students across 3 tests. Section 1 involves setting up arrays to store student names and marks. Section 2 calculates total scores and averages. Section 3 selects the highest scoring student. Question 1 asks the candidate to (a) declare arrays for names and marks, (b) design an algorithm for sections 1-2 using pseudocode, and (c) provide validation test data and explain how to select the highest score.

Uploaded by

Muaarij Haider
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

The City School

Unified Pre-Mock Examination


January 2021
Class 11

CAMPUS /
BRANCH NAME

EXAMINATION
DATE
ROLL NUMBER

COMPUTER SCIENCE 2210/22


Paper 2 Problem-solving and Programming 1 hour 45 minutes

You must answer on the question paper.

No additional materials are needed.

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.

Invigilated by: ___________ Marked by:____________ Marks tallied by: __________

This document has 14 pages. Blank pages are indicated

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 1 – Set up arrays


Set-up one dimensional arrays to store:
• Student names
• Student marks for Test 1, Test 2 and Test 3
o Test 1 is out of 20 marks
o Test 2 is out of 25 marks
o Test 3 is out of 35 marks
• Total score for each student
Input and store the names for 30 students. You may assume that the students’ names
are unique.
Input and store the students’ marks for Test 1, Test 2 and Test 3. All the marks must be
validated on entry and any invalid marks rejected.

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.

(i) Declare the array to store the students’ 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

Task 1. Explain why you chose each data set.

Set 1

Reason for choice

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

Set 2

Reason for choice

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

[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.

Array Boolean Char Constant Function Integer Iteration

Procedure Real String Variable

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..............................................................................................................................

A single number, symbol or letter

Data type..............................................................................................................................

A sequence of characters

Data type..............................................................................................................................

A data type with two values, True or False

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

12 IF Mark[Count] > HighestMark


13 THEN
14 Mark[count] ← HighestMark

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.

Error 1 line number..............................................................................................................

Correction............................................................................................................................

.............................................................................................................................................

Error 2 line number..............................................................................................................

Correction............................................................................................................................

.............................................................................................................................................

Error 3 line number..............................................................................................................

Correction............................................................................................................................

.............................................................................................................................................

Error 4 line number..............................................................................................................

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

PointsWon PointsLost Difference OUTPUT

[3]

(b) The flowchart needs to be changed. When the difference is more than 5000 the
output message is ‘Fantastic leap up two levels’.

Describe the changes that will need to be made to the flowchart.

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.............................................................................................................................................

.........................................................................................................................................[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.

Fruit 1 Fruit 2 Size Volume (ml) Stock level


Juice code
Mango Orange Large 1000 18
LMO10
Orange Orange Medium 500 8
MOO05
Apple Mango Small 200 25
SAM02
Apple Apple Small 200 50
SAA02
Pineapple Pineapple Small 200 10
SPP02
Mango Mango Medium 500 12
MMM05
Mango Mango Large 1000 5
LMM10
Guava Guava Medium 500 5
MGG05
Mango Orange Small 200 7
SMO02
Orange Pineapple Medium 500 12
MOP05
Apple Apple Large 1000 32
LAA10
Guava Orange Small 200 10
SGO02
Pineapple Pineapple Large 1000 3
LPP10
Orange Orange Large 1000 25
LOO10
Orange Orange Small 200 40
SOO02

(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

You might also like