0% found this document useful (0 votes)
4 views105 pages

Computer Science Marking Scheme 2022

The document outlines the marking scheme and evaluation guidelines for the Senior Secondary School Term II Examination in Computer Science. It emphasizes the importance of strict adherence to the marking scheme, confidentiality of evaluation policies, and specific instructions for evaluating answers, particularly in programming and SQL contexts. The document also details common errors to avoid and the structure of the examination paper, including sections and marks distribution.

Uploaded by

anshikas3690
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)
4 views105 pages

Computer Science Marking Scheme 2022

The document outlines the marking scheme and evaluation guidelines for the Senior Secondary School Term II Examination in Computer Science. It emphasizes the importance of strict adherence to the marking scheme, confidentiality of evaluation policies, and specific instructions for evaluating answers, particularly in programming and SQL contexts. The document also details common errors to avoid and the structure of the examination paper, including sections and marks distribution.

Uploaded by

anshikas3690
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

Strictly Confidential: (For Internal and Restricted use only)

Senior Secondary School Term II Examination, 2022


Marking Scheme – COMPUTER SCIENCE (SUBJECT CODE – 083)
(Series: %BAB%, SET - 4, PAPER CODE –91)
General Instructions :

1. You are aware that evaluation is the most important process in the actual and correct
assessment of the candidates. A small mistake in evaluation may lead to serious problems
which may affect the future of the candidates, education system and teaching profession. To
avoid mistakes, it is requested that before starting evaluation, you must read and
understand the spot evaluation guidelines carefully.
2. “Evaluation policy is a confidential policy as it is related to the confidentiality of the
examinations conducted, Evaluation done and several other aspects. Its’ leakage to the
public in any manner could lead to derailment of the examination system and affect the
life and future of millions of candidates. Sharing this policy/document to anyone,
publishing in any magazine and printing in News Paper/Website etc may invite action
under IPC.”
3. Evaluation is to be done as per instructions provided in the Marking Scheme. It should not be
done according to one’s own interpretation or any other consideration. Marking Scheme should
be strictly adhered to and religiously followed. However, while evaluating answers which are
based on latest information or knowledge and/or are innovative, they may be assessed
for their correctness otherwise and marks be awarded to them. In class-XII, while
evaluating two competency based questions, please try to understand the given answer
and even if the reply is not from the marking scheme but correct competency is
enumerated by the candidate, marks should be awarded.
4. The Head-Examiner must go through the first five answer books evaluated by each evaluator
on the first day, to ensure that evaluation has been carried out as per the instructions given in
the Marking Scheme. The remaining answer books meant for evaluation shall be given only
after ensuring that there is no significant variation in the marking of individual evaluators.
5. Evaluators will mark( √ ) wherever the answer is correct. For wrong answer ‘X’ be marked.
Evaluators will not put the right kind of mark while evaluating which gives an impression that
the answer is correct and no marks are awarded. This is the most common mistake which
evaluators are committing.
6. If a question has parts, please award marks on the right-hand side for each part. Marks
awarded for different parts of the question should then be totaled up and written in the left-hand
margin and encircled. This may be followed strictly.
7. If a question does not have any parts, marks must be awarded in the left-hand margin and
encircled. This may also be followed strictly.
8. If a student has attempted an extra question, the answer of the question deserving more marks
should be retained and the other answer scored out.
9. No marks to be deducted for the cumulative effect of an error. It should be penalized only once.
10.A full scale of marks 35 (example 0-35 marks as given in Question Paper) has to be used.
Please do not hesitate to award full marks if the answer deserves it.
[Link] examiner has to necessarily do evaluation work for full working hours i.e. 8 hours every
day and evaluate 30 answer books per day in main subjects and 35 answer books per day in
other subjects (Details are given in Spot Guidelines). This is in view of the reduced syllabus
and number of questions in the question paper.

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #1/15]
[Link] that you do not make the following common types of errors committed by the Examiner
in the past :-
● Leaving the answer or part thereof unassessed in an answer book.
● Giving more marks for an answer than assigned to it.
● Wrong totaling of marks awarded on a reply.
● Wrong transfer of marks from the inside pages of the answer book to the title page.
● Wrong question wise totaling on the title page.
● Wrong totaling of marks of the two columns on the title page.
● Wrong grand total.
● Marks in words and figures not tallying.
● Wrong transfer of marks from the answer book to online award list.
● Answers marked as correct, but marks not awarded. (Ensure that the right tick mark is
correctly and clearly indicated. It should merely be a line. Same is with the X for incorrect
answers.)
● Half or a part of the answer was marked correct and the rest as wrong, but no marks
awarded.
[Link] evaluating the answer books if the answer is found to be totally incorrect, it should be
marked as cross (X) and awarded zero (0) Marks.
[Link] unassessed portion, non-carrying over of marks to the title page, or totaling error detected
by the candidate shall damage the prestige of all the personnel engaged in the evaluation work
as also of the Board. Hence, in order to uphold the prestige of all concerned, it is again
reiterated that the instructions be followed meticulously and judiciously.
[Link] Examiners should acquaint themselves with the guidelines given in the Guidelines for spot
Evaluation before starting the actual evaluation.
[Link] Examiner shall also ensure that all the answers are evaluated, marks carried over to the
title page, correctly totaled and written in figures and words.
[Link] Board permits candidates to obtain a photocopy of the Answer Book on request in an RTI
application and also separately as a part of the re-evaluation process on payment of the
processing charges.

Specific Instructions:

● The answers given in the marking scheme are SUGGESTIVE. Examiners are requested
to award marks for all alternative correct Solutions/Answers conveying a similar
meaning.
● All programming questions have to be answered with respect to Python only.
● In Python, ignore case sensitivity for identifiers/ Variables / Functions.
● In Python indentation is mandatory, however, the number of spaces used for
indenting may vary.
● In SQL related questions – both ways of text/character entries should be acceptable
for Example: “AMAR” and ‘amar’ both are acceptable.
● In SQL related questions – all date entries should be acceptable for Example:
‘YYYY-MM-DD’, ‘YY-MM-DD’, ‘DD-Mon-YY’, “DD/MM/YY”, ‘DD/MM/YY’, “MM/DD/YY”,
‘MM/DD/YY’ and {MM/DD/YY} are correct.
● In SQL related questions – semicolon should be ignored for terminating the SQL
statements.
● In SQL related questions, ignore case sensitivity.

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #2/15]
Maximum Marks: 35 Time: 2 hours
General Instructions :
i. This question paper is divided into 3 Sections – A, B and C
ii. Section A, consists of 7 questions (1-7). Each question carries 2 marks.
iii. Section B, consists of 3 questions (8-10). Each question carries 3 marks.
iv. Section C, consists of 3 questions (11-13). Each question carries 4 marks.
v. Internal choices have been given for question numbers 7, 8 and 12.

Section -A
(Each question carries 2 marks)
1. “Stack is a linear data structure which follows a particular order in which 2
the operations are performed.”

What is the order in which the operations are performed in a Stack ?


Name the List method/function available in Python which is used to
remove the last element from a list implemented stack.

Also write an example using Python statements for removing the last
element of the list.
Ans Order of operations performed in a Stack is
LIFO (Last In First Out)

The List method in Python to remove the last element


from a list implemented stack is

pop()
OR
pop(-1)
OR
pop

Example:
L=[10,20,30,40]
[Link]() OR [Link](-1)

OR

Any other appropriate example

(1 mark for writing correct order)


(½ mark for writing pop or any other correct method/function)
(½ mark for writing correct Python code of an example)

OR
(1 mark for writing correct order)
(1 mark for correct Python statement to demonstrate the pop() function)

(Note: FILO - First In Last Out, may also be considered)

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #3/15]
2. (i) Expand the following : 1
VoIP, PPP
Ans VoIP : Voice over Internet Protocol
PPP : Point to Point Protocol
(½ mark each for writing correct expansion)

(ii) Riya wants to transfer pictures from her mobile phone to her laptop. She 1
uses Bluetooth technology to connect two devices. Which type of network
(PAN/LAN/MAN/WAN) will be formed in this case?
Ans PAN/ Personal Area Network
(1 mark for correct type of network)

3. Differentiate between the terms Attribute and Domain in the context of 2


Relational Data Model.
Ans
Attribute Domain

The column/field of a It is a set of permissible


table/relation is known as values from which
an attribute. attributes can take/obtain
required value.

For example:
Table: Student
Name Class Marks

aaa XII 90

bbb X 99

Name, Class and Marks are The attribute class has


attributes domain of X, XII

(1 mark each for writing any correct explanation of Attribute and Domain)

4. Consider the following SQL table MEMBER in a SQL Database CLUB: 2


Table: MEMBER
M_ID NAME ACTIVITY
M1001 Amina GYM
M1002 Pratik GYM
M1003 Simon SWIMMING
M1004 Rakesh GYM
M1005 Avneet SWIMMING

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #4/15]
Assume that the required library for establishing the connection between
Python and MYSQL is already imported in the given Python code. Also
assume that DB is the name of the database connection for table MEMBER
stored in the database CLUB.

Predict the output of the following code:

MYCUR = [Link]()
[Link]("USE CLUB")
[Link]("SELECT * FROM MEMBER WHERE ACTIVITY='GYM'")
R=[Link]()
for i in range(2):
R=[Link]()
print(R[0], R[1], sep ="#")

Ans M1002#Pratik
M1004#Rakesh

(1 mark for writing each correct line of output)

(Note: Deduct ½ mark for missing # or writing the output in a single line OR
writing any additional line along with the correct output)

5. Write the output of the SQL queries (a) to (d) based on the table 2
VACCINATION_DATA given below:

TABLE: VACCINATION_DATA
VID Name Age Dose1 Dose2 City
101 Jenny 27 2021-12-25 2022-01-31 Delhi
102 Harjot 55 2021-07-14 2021-10-14 Mumbai
103 Srikanth 43 2021-04-18 2021-07–20 Delhi
104 Gazala 75 2021-07-31 NULL Kolkata
105 Shiksha 32 2022-01-01 NULL Mumbai

(a) SELECT Name, Age FROM VACCINATION_DATA


WHERE Dose2 IS NOT NULL AND Age > 40;

Ans Name Age


Harjot 55
Srikanth 43

(½ mark for the correct output )


(Note: Ignore column heading of the output and order of the output rows)

(b) SELECT City, COUNT(*) FROM VACCINATION_DATA


GROUP BY City;

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #5/15]
Ans
City COUNT(*)
Delhi 2
Mumbai 2
Kolkata 1

(½ mark for the correct output )


(Note: Ignore column heading of the output and order of the output rows)

(c) SELECT DISTINCT City FROM VACCINATION_DATA;

Ans City
Delhi
Mumbai
Kolkata

(½ mark for the correct output )


(Note: Ignore column heading of the output and order of the output rows)

(d) SELECT MAX(Dose1),MIN(Dose2)FROM VACCINATION_DATA;

Ans MAX(Dose1) MIN(Dose2)


2022-01-01 2021-07-20

(½ mark for the correct output )


(Note: Ignore column heading of the output and order of the output rows)

6 Write the output of SQL queries (a) and (b) based on the following two 2
tables DOCTOR and PATIENT belonging to the same database :
Table: DOCTOR
DNO DNAME FEES
D1 AMITABH 1500
D2 ANIKET 1000
D3 NIKHIL 1500
D4 ANJANA 1500

Table: PATIENT
PNO PNAME ADMDATE DNO
P1 NOOR 2021-12-25 D1
P2 ANNIE 2021-11-20 D2
P3 PRAKASH 2020-12-10 NULL
P4 HARMEET 2019-12-20 D1

(a) SELECT DNAME, PNAME FROM DOCTOR


NATURAL JOIN PATIENT ;

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #6/15]
Ans DNAME PNAME
AMITABH NOOR
ANIKET ANNIE
AMITABH HARMEET

(1 mark for writing correct output)

Note:
Deduct ½ mark for any additional row along with the correct rows
Ignore column heading of the output and order of the output rows

(b) SELECT PNAME, ADMDATE, FEES


FROM PATIENT P, DOCTOR D
WHERE [Link] = [Link] AND FEES > 1000;

Ans PNAME ADMDATE FEES


NOOR 2021-12-25 1500
HARMEET 2019-12-20 1500

(1 mark for writing correct output)

Note:
Deduct ½ mark for any additional row along with the correct rows
Ignore column heading of the output and order of the output rows
7. Differentiate between Candidate Key and Primary Key in the context of 2
Relational Database Model.
Ans A table may have more than one or a combination of
attribute(s)that identifies a tuple uniquely. All such
attribute(s) are known as Candidate Keys.

Out of all the Candidate keys, the most appropriate one,


which is used for unique identification of the Tuples,
is called the Primary Key.

Example:
Table: BANK
ACNO NAME PHONE
10001 RISHABH 9810876677
10031 ARNAV 9810876123
10064 ARNAV 9810875577
10076 GURSHARAN 9810871144
Candidate Keys: ACNO, PHONE
Primary Key: ACNO

(2 marks for correct explanation OR example given to differentiate the keys)

OR
(1 mark for writing only the correct explanation/example of candidate key)
(1 mark for writing only the correct explanation/example of primary key)
[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #7/15]
OR
Consider the following table PLAYER : 2
Table: PLAYER
PNO NAME SCORE
P1 RISHABH 52
P2 HUSSAIN 45
P3 ARNOLD 23
P4 ARNAV 18
P5 GURSHARAN 42

(a) Identify and write the name of the most appropriate column from the
given table PLAYER that can be used as a Primary key.
Ans PNO

(1 mark for mentioning PNO)

(Note: Don’t deduct marks, if any additional column name is also mentioned
along with PNO)

(b) Define the term Degree in relational data model. What is the Degree of
the given table PLAYER ?
Ans Total number of columns/attributes in a table/relation
is known as its Degree.

The Degree of the given table is 3.

(½ mark for writing/explaining with example the correct meaning of Degree)


(½ mark writing correct Degree of the given table)

Section -B
(Each question carries 3 marks)
8. ● Write the definition of a user defined function PushNV(N) which 3
accepts a list of strings in the parameter N and pushes all strings
which have no vowels present in it, into a list named NoVowel.
● Write a program in Python to input 5 Words and push them one by one
into a list named All.
The program should then use the function PushNV() to create a stack
of words in the list NoVowel so that it stores only those words which
do not have any vowel present in it, from the list All.
Thereafter, pop each word from the list NoVowel and display the
popped word. When the stack is empty, display the message
"EmptyStack".

For example:

If the Words accepted and pushed into the list All are
['DRY', 'LIKE', 'RHYTHM', 'WORK', 'GYM']

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #8/15]
Then the stack NoVowel should store
['DRY', 'RHYTHM', 'GYM']

And the output should be displayed as

GYM RHYTHM DRY EmptyStack

Ans def PushNV(N):


for W in N :
for C in W :
if [Link]() in 'AEIOU':
break
else:
[Link](W)
All=[]
NoVowel=[]

for i in range(5) :
[Link](input('Enter a Word: '))

PushNV(All)

while NoVowel :
print([Link](), end=' ')
else :
print('EmptyStack')

OR

Any other correct equivalent code

(½ mark for checking vowels correctly, ignore case sensitivity)


(½ mark for pushing strings into the stack NoVowel)
(½ mark for reading 5 words from the users)
(½ mark for assigning 5 words into All)
(½ mark for writing correct code to pop and display the words from NoVowel)
(½ mark for writing correct code to check empty stack and display the message
'EmptyStack')
OR
● Write the definition of a user defined function Push3_5(N) which
accepts a list of integers in a parameter N and pushes all those
integers which are divisible by 3 or divisible by 5 from the list N into
a list named Only3_5.
● Write a program in Python to input 5 integers into a list named NUM.
The program should then use the function Push3_5() to create the
stack of the list Only3_5. Thereafter pop each integer from the list
Only3_5 and display the popped value. When the list is empty, display
the message "StackEmpty".

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #9/15]
For example:
If the integers input into the list NUM are :

[10,6,14,18,30]
Then the stack Only3_5 should store

[10,6,18,30]

And the output should be displayed as

30 18 6 10 StackEmpty
Ans def Push3_5(N):
for i in N :
if i%3==0 or i%5==0 :
Only3_5.append(i)

NUM=[]
Only3_5=[]

for i in range(5):
[Link](int(input('Enter an Integer: ')))

Push3_5(NUM)

while Only3_5 :
print(Only3_5.pop(), end=' ')
else :
print('StackEmpty')

OR
Any other correct equivalent code
(½ mark for checking divisibility correctly)
(½ mark for pushing integers into the stack Only3_5)
(½ mark for reading 5 integers from the users)
(½ mark for assigning those 5 integers into NUM)
(½ mark for writing correct code to pop and display the integers from Only3_5)
(½ mark for writing correct code to check empty stack and display the message
'StackEmpty')

9. (i) A SQL table ITEMS contains the following columns: 1


INO, INAME, QUANTITY, PRICE, DISCOUNT
Write the SQL command to remove the column DISCOUNT from the table.

Ans ALTER TABLE ITEMS


DROP COLUMN DISCOUNT;
OR
ALTER TABLE ITEMS
DROP DISCOUNT;

(½ mark for writing ALTER TABLE ITEMS)


(½ mark for writing DROP COLUMN DISCOUNT OR DROP DISCOUNT)

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #10/15]
(ii) Categorize the following SQL commands into DDL and DML : 2
CREATE, UPDATE, INSERT, DROP

Ans DDL Commands : CREATE, DROP


DML Commands : INSERT, UPDATE

(½ Mark each for writing the correct DDL/DML commands)

10. Rohan is learning to work upon Relational Database Management System 3


(RDBMS) application. Help him to perform following tasks:

(a) To open the database named "LIBRARY".

Ans USE LIBRARY ;

(1 Mark for writing correct SQL command)

(b) To display the names of all the tables stored in the opened database.

Ans SHOW TABLES;


OR
SHOW TABLES FROM LIBRARY;

(1 Mark for writing correct SQL command)

(c) To display the structure of the table "BOOKS" existing in the already
opened database "LIBRARY".

Ans DESCRIBE BOOKS ;


OR
DESC BOOKS ;

(1 Mark for writing correct SQL command)

Section - C
(Each question carries 4 marks)

11. Write SQL queries for (a) to (d) based on the tables PASSENGER and 4
FLIGHT given below:
Table : PASSENGER
PNO NAME GENDER FNO
1001 Suresh MALE F101
1002 Anita FEMALE F104
1003 Harjas MALE F102
1004 Nita FEMALE F103
Table: FLIGHT
FNO START END F_DATE FARE
F101 MUMBAI CHENNAI 2021-12-25 4500
F102 MUMBAI BENGALURU 2021-11-20 4000
F103 DELHI CHENNAI 2021-12-10 5500
F104 KOLKATA MUMBAI 2021-12-20 4500
F105 DELHI BENGALURU 2021-01-15 5000

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #11/15]
(a) Write a query to change the fare to 6000 of the flight whose FNO is F104.

Ans UPDATE FLIGHT


SET FARE=6000 WHERE FNO="F104";

(½ Mark for writing UPDATE FLIGHT)


(½ Mark for writing SET FARE=6000 WHERE FNO="F104")

(b) Write a query to display the total number of MALE and FEMALE
PASSENGERS.

Ans SELECT GENDER, COUNT(*) FROM PASSENGER


GROUP BY GENDER;
OR
SELECT COUNT(*) FROM PASSENGER
GROUP BY GENDER;

(½ mark for writing SELECT part correctly)


(½ mark for writing GROUP BY GENDER; )
OR
(any alternate correct uses of COUNT() is acceptable)

(c) Write a query to display the NAME, corresponding FARE and F_DATE of
all PASSENGERS who have a flight to START from DELHI.

Ans SELECT NAME, FARE, F_DATE FROM PASSENGER P, FLIGHT F


WHERE [Link]= [Link] AND START = 'DELHI';
OR
SELECT NAME, FARE, F_DATE FROM PASSENGER, FLIGHT
WHERE [Link]= [Link] AND START = 'DELHI';
OR
SELECT NAME, FARE, F_DATE FROM PASSENGER, FLIGHT
WHERE [Link]= [Link] AND START LIKE 'DELHI';
OR
SELECT NAME,FARE,F_DATE FROM PASSENGER NATURAL JOIN FLIGHT
WHERE START = 'DELHI';
OR
Any other correct and equivalent query

(½ mark for writing SELECT - FROM part correctly)


(½ mark for writing WHERE part correctly)

(d) Write a query to delete the records of flights which end at Mumbai.

Ans DELETE FROM FLIGHT


WHERE END = "MUMBAI";
OR
DELETE FROM FLIGHT
WHERE END LIKE "MUMBAI";

(½ mark for writing DELETE FROM FLIGHT)


(½ mark for writing WHERE part correctly)

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #12/15]
12. (i) Differentiate between Bus Topology and Tree Topology. Also, write one 2
advantage of each of them.

Ans
Bus Topology Tree Topology

In bus topology, each It is a hierarchical topology, in


communicating device connects which there are multiple
to a single transmission branches and each branch can
medium, known as bus. have one or more basic
topologies like star, ring and
bus.
Advantage: Advantage:
It is very cost-effective as It is easier to set-up multi-level
compared to other network plans for the network.
topologies.
OR
Any other correct difference/definition/advantages

(1 Mark for mentioning any one correct difference between the topologies)
(½ mark each for writing any one advantage of Bus and Tree Topologies)

OR
(½ mark each for conveying correct understanding of Bus and Tree Topology
using/not using diagram)
(½ mark each for writing any one advantage of Bus and Tree Topologies)

OR

Differentiate between HTML and XML.

Ans
HTML XML
It stands for HyperText Markup It stands for eXtensible Markup
Language. Language.
It contains predefined tags It contains user defined tags to
which are used to design describe and store the data.
webpages.
OR
Any other valid difference/characteristic

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #13/15]
(Full 2 Marks for writing any one correct difference between HTML and XML)

OR

(1 Mark for writing correct explanation of HTML)


OR
(½ Mark for writing full form of HTML)

(1 Mark for writing correct explanation of XML)


OR
(½ Mark for writing full form of XML)

(ii) What is a web browser ? Write the names of any two commonly used web 2
browsers.

Ans A Web browser is a software/tool, which allows us to


view/access the content of WebPages.
OR
It is a Client software program that is used to access
various kinds of Internet resources using HTTP.
Examples :
Google Chrome, Microsoft Edge, Mozilla Firefox, Apple
Safari, Opera, Chromium, etc. (ANY TWO)

(1 Mark for writing correct explanation of Web-Browser)


(½ Mark for writing each correct name of two Web-Browsers)

13. Galaxy Provider Ltd. is planning to connect its office in Texas, USA with its 4
branch at Mumbai. The Mumbai branch has 3 Offices in three blocks
located at some distance from each other for different operations –
ADMIN, SALES and ACCOUNTS.
As a network consultant, you have to suggest the best network related
solutions for the issues/problems raised in (a) to (d), keeping in mind the
distances between various locations and other given parameters.
Layout of the Offices in the Mumbai branch:

Shortest distances between various locations:


ADMIN Block to SALES Block 300 m
SALES Block to ACCOUNTS Block 175 m
ADMIN Block to ACCOUNTS Block 350 m
MUMBAI Branch to TEXAS Head Office 14000 km

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #14/15]
Number of Computers installed at various locations are as follows:
ADMIN Block 255
ACCOUNTS Block 75
SALES Block 30
TEXAS Head Office 90

(a) It is observed that there is a huge data loss during the process of data
transfer from one block to another. Suggest the most appropriate
networking device out of the following, which needs to be placed along
the path of the wire connecting one block office with another to refresh
the signal and forward it ahead.
(i) MODEM (ii) ETHERNET CARD
(iii) REPEATER (iv) HUB
Ans (iii) REPEATER
(1 Mark for correct identification of the Networking Device)

(b) Which hardware networking device out of the following, will you suggest
to connect all the computers within each block ?
(i) SWITCH (ii) MODEM
(iii) REPEATER (iv) ROUTER
Ans (i) SWITCH
(1 Mark for correct identification of the Networking Device)

(c) Which service/protocol out of the following will be most helpful to


conduct live interactions of employees from Mumbai Branch and
their counterparts in Texas ?
(i) FTP (ii) PPP
(iii) SMTP (iv) VoIP
Ans (iv) VoIP
(1 Mark for correct identification of the service/protocol)

(d) Draw the cable layout (block to block) to efficiently connect the three
offices of the Mumbai branch.
Ans

OR any alternate cable layout

(1 Mark for drawing correct cable layout)

[Sub Code: 083 Series: %BAB% Paper Code: 91 Set - 4] [Page #15/15]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

Marking Scheme
Strictly Confidential
(For Internal and Restricted use only)
Senior School Certificate Examination, 2023
SUBJECT NAME: COMPUTER SCIENCE (SUBJECT CODE: 083) (PAPER CODE: 91)

General Instructions:
1 You are aware that evaluation is the most important process in the actual and correct assessment
of the candidates. A small mistake in evaluation may lead to serious problems which may affect
the future of the candidates, education system and teaching profession. To avoid mistakes, it is
requested that before starting evaluation, you must read and understand the spot evaluation
guidelines carefully.

2 “Evaluation policy is a confidential policy as it is related to the confidentiality of the


examinations conducted, Evaluation done and several other aspects. Its’ leakage to public
in any manner could lead to derailment of the examination system and affect the life and
future of millions of candidates. Sharing this policy/document to anyone, publishing in
any magazine and printing in News Paper/Website etc may invite action under various
rules of the Board and IPC.”

3 Evaluation is to be done as per instructions provided in the Marking Scheme. It should not be
done according to one’s own interpretation or any other consideration. Marking Scheme should
be strictly adhered to and religiously followed. However, while evaluating, answers which are
based on latest information or knowledge and/or are innovative, they may be assessed for
their correctness otherwise and due marks be awarded to them. In class-X, while
evaluating two competency-based questions, please try to understand given answer and
even if reply is not from marking scheme but correct competency is enumerated by the
candidate, due marks should be awarded.

4 The Marking scheme carries only suggested value points for the answers. These are in the nature
of Guidelines only and do not constitute the complete answer. The students can have their own
expression and if the expression is correct, the due marks should be awarded accordingly.

5 The Head-Examiner must go through the first five answer books evaluated by each evaluator on
the first day, to ensure that evaluation has been carried out as per the instructions given in the
Marking Scheme. If there is any variation, the same should be zero after delibration and
discussion. The remaining answer books meant for evaluation shall be given only after ensuring
that there is no significant variation in the marking of individual evaluators.

6 Evaluators will mark( √ ) wherever answer is correct. For wrong answer CROSS ‘X” be marked.
Evaluators will not put right (✓)while evaluating which gives an impression that answer is correct
and no marks are awarded. This is most common mistake which evaluators are committing.

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #1/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

7 If a question has parts, please award marks on the right-hand side for each part. Marks awarded
for different parts of the question should then be totaled up and written in the left-hand margin
and encircled. This may be followed strictly.

8 If a question does not have any parts, marks must be awarded in the left-hand margin and
encircled. This may also be followed strictly.

9 If a student has attempted an extra question, answer of the question deserving more marks
should be retained and the other answer scored out with a note “Extra Question”.

10 No marks to be deducted for the cumulative effect of an error. It should be penalized only once.

11 A full scale of marks __________(example 0 to 80/70/60/50/40/30 marks as given in Question


Paper) has to be used. Please do not hesitate to award full marks if the answer deserves it.

12 Every examiner has to necessarily do evaluation work for full working hours i.e., 8 hours every
day and evaluate 20 answer books per day in main subjects and 25 answer books per day in
other subjects (Details are given in Spot Guidelines).This is in view of the reduced syllabus and
number of questions in question paper.

13 Ensure that you do not make the following common types of errors committed by the Examiner
in the past:-
● Leaving answer or part thereof unassessed in an answer book.
● Giving more marks for an answer than assigned to it.
● Wrong totaling of marks awarded on an answer.
● Wrong transfer of marks from the inside pages of the answer book to the title
page.
● Wrong question wise totaling on the title page.
● Wrong totaling of marks of the two columns on the title page.
● Wrong grand total.
● Marks in words and figures not tallying/not same.
● Wrong transfer of marks from the answer book to online award list.
● Answers marked as correct, but marks not awarded. (Ensure that the right tick
mark is correctly and clearly indicated. It should merely be a line. Same is with the
X for incorrect answer.)
● Half or a part of answer marked correct and the rest as wrong, but no marks
awarded.

14 While evaluating the answer books if the answer is found to be totally incorrect, it should be
marked as cross (X) and awarded zero (0)Marks.

15 Any un assessed portion, non-carrying over of marks to the title page, or totaling error detected
by the candidate shall damage the prestige of all the personnel engaged in the evaluation work
as also of the Board. Hence, in order to uphold the prestige of all concerned, it is again reiterated
that the instructions be followed meticulously and judiciously.

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #2/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

16 The Examiners should acquaint themselves with the guidelines given in the “Guidelines for spot
Evaluation” before starting the actual evaluation.

17 Every Examiner shall also ensure that all the answers are evaluated, marks carried over to the
title page, correctly totaled and written in figures and words.

18 The candidates are entitled to obtain a photocopy of the Answer Book on request on payment of
the prescribed processing fee. All Examiners/Additional Head Examiners/Head Examiners are
once again reminded that they must ensure that evaluation is carried out strictly as per value
points for each answer as given in the Marking Scheme.

General Instructions:
(i) This question paper contains five sections, Section A to E.
(ii) All questions are compulsory.
(iii) Section A have 18 questions carrying 1 mark each.
(iv) Section B has 7 Very Short Answer type questions carrying 2 marks each.
(v) Section C has 5 Short Answer type questions carrying 3 marks each.
(vi) Section D has 3 Long Answer type questions carrying 5 marks each.
(vii) Section E has 2 questions carrying 4 marks each. One internal choice is given in
Q.34 and 35, against Part (iii) only.
(viii) All programming questions are to be answered using Python Language only.

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #3/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

SECTION - A

1. State True or False. 1


“Identifiers are names used to identify a variable, function in a program”.
Ans True
(1 mark for writing correct answer)

2. Which of the following is a valid keyword in Python ? 1


(a) false (b) return
(c) non_local (d) none
Ans (b) return
(1 mark for writing correct answer)

3. Given the following Tuple 1


Tup= (10, 20, 30, 50)
Which of the following statements will result in an error ?
(a) print (Tup[0]) (b) [Link] (2, 3)
(c) print (Tup [1:2]) (d) print (len (Tup))
Ans (b) [Link] (2, 3)
(1 mark for writing correct answer)

4. Consider the given expression : 1


5<10 and 12>7 or not 7>4
Which of the following will be the correct output, if the given expression is
evaluated ?
(a) True (b) False
(c) NONE (d) NULL
Ans (a) True
(1 mark for writing correct answer)

5. Select the correct output of the code : 1


S= "Amrit Mahotsav @ 75"
A=[Link] (" ")
print (a)
(a) ('Amrit Mahotsav','@','75')
(b) ['Amrit','Mahotsav','@','75']
(c) ('Amrit', 'Mahotsav @ 75')
(d) ('Amrit','' , 'Mahotsav @ 75')
Ans (d) ('Amrit', '', 'Mahotsav @ 75')

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #4/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

(1 mark for writing correct answer)


OR
(1 mark for mentioning Error in code OR no correct option)
Note:
print(A) is wrongly typed as print(a)
6. Which of the following mode keeps the file offset position at the end of the 1
file ?
(a) r+ (b) r
(c) w (d) a
Ans (d) a
(1 mark for writing correct answer)

7. Fill in the blank. 1


_____ function is used to arrange the elements of a list in ascending order.
(a) sort() (b) arrange()
(c) ascending() (d) asort()
Ans (a) sort()
(1 mark for writing correct answer)

8. Which of the following operators will return either True or False ? 1


(a) += (b) !=
(c) = (d) *=
Ans (b) !=
(1 mark for writing correct answer)
OR
(1 mark for mentioning No option OR Error in question)

Note:
an operator does not return any values until it is part of an expression

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #5/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

9. Which of the following statement(s) would give an error after executing the 1
following code ?
Stud={"Murugan" : 100, "Mithu" : 95} # Statement 1
print (Stud[95]) # Statement 2
Stud ["Murugan"]=99 # Statement 3
print([Link]()) # Statement 4
print(Stud) # Statement 5

(a) Statement 2 (b) Statement 3


(c) Statement 4 (d) Statements 2 and 4
Ans (a) Statement 2
OR
(d) Statements 2 and 4
(1 mark for writing correct answer as (a))
OR
(1 mark for writing correct answer as (d))
OR
(1 mark for writing (a) and (c) as the correct answers)
OR
(Only ½ mark for writing (c) as the correct answer)

10. Fill in the blank. 1


_____ is a number of tuples in a relation.
(a) Attribute (b) Degree
(c) Domain (d) Cardinality
Ans (d) Cardinality
(1 mark for writing correct answer)

11. The syntax of seek () is : 1


file_object.seek (offset[, reference_point] )
What is the default value of reference_point ?
(a) 0 (b) 1
(c) 2 (d) 3
Ans (a) 0
(1 mark for writing correct answer)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #6/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

12. Fill in the blank : 1


_______ clause is used with SELECT statement to display data in a sorted
form with respect to a specified column.
(a) WHERE (b) ORDER BY
(c) HAVING (d) DISTINCT
Ans (b) ORDER BY
(1 mark for writing correct answer)

13. Fill in the blank : 1


______ is used for point-to-point communication or unicast communication
such as radar and satellite.
(a) INFRARED WAVES (b) BLUETOOTH
(c) MICROWAVES (d) RADIOWAVES
Ans (c) MICROWAVES
OR
(d) RADIOWAVES
(1 mark for writing correct answer as (c) MICROWAVES)
OR
(1 mark for writing correct answer as (d) RADIOWAVES)

14. What will the following expression be evaluated to in Python ? 1


print(4+3*5/3–5%2)
(a) 8.5 (b) 8.0
(c) 10.2 (d) 10.0
Ans (b) 8.0
(1 mark for writing correct answer)

15. Which function returns the sum of all elements of a list ? 1


(a) count() (b) sum()
(c) total() (d) add()
Ans (b) sum()
(1 mark for writing correct answer)

16. fetchall() method fetches all rows in a result set and returns a : 1
(a) Tuple of lists (b) List of tuples
(c) List of strings (d) Tuple of strings
Ans. (b) List of tuples
(1 mark for writing correct answer)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #7/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

Q. 17 and 18 are ASSERTION (A) and REASONING (R) based questions.


Mark the correct choice as
(a) Both (A) and (R) are true and (R) is the correct explanation for (A).
(b) Both (A) and (R) are true and (R) is not the correct explanation for (A).
(c) (A) is true but (R) is false.
(d) (A) is false but (R) is true.
17. Assertion (A) : To use a function from a particular module, we need to 1
import the module.
Reason (R) : import statement can be written anywhere in the program,
before using a function from that module.
Ans. (b) Both (A) and (R) are true and (R) is not the correct explanation for (A)
(1 mark for writing correct answer)
OR
(½ mark for writing (a) as the correct option)

18. Assertion (A): A stack is a LIFO structure. 1


Reason (R) : Any new element pushed into the stack always gets positioned
at the index after the last existing element in the stack
Ans (c) (A) is true but (R) is false.
(1 mark for writing (c) as the correct option)
OR
(1 mark for writing (b) as the correct option)
OR
(1 mark for writing (a) as the correct option)

SECTION B
19. Atharva is a Python programmer working on a program to find and return the 2
maximum value from the list. The code written below has syntactical errors.
Rewrite the correct code and underline the corrections made.
def max_num (L) :
max=L(0)
for a in L :
if a > max
max=a
return max

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #8/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

Ans def max_num (L) :


max=L[0]
for a in L:
if a > max:
max=a
return max
(1½ marks for correcting all 3 mistakes)
(½ mark for underlining the corrections)
OR
(1 mark for correcting only 2 mistakes)
(½ mark for underlining the corrections)
OR
(½ mark for correcting only 1 mistake)
(½ mark for underlining the correction)

20. (a) Differentiate between wired and wireless transmission. 2

Ans In case of wired or guided transmission, there is a physical link made of


wire/cable through which data in terms of signals are propagated between
the nodes. These are usually metallic cable, fiber-optic cable, etc.

In case of wireless or unguided transmission, data travels in air in terms of


electromagnetic waves using an antenna. These are usually bluetooth,
microwaves, infrared, radio waves, etc.

OR
In case of wired transmission, the devices in the network are connected using
cables.
Wireless transmission uses waves/rays to connect devices.

OR
Any other valid difference (any one)
(2 marks for differentiating with or without examples)
OR
(1 mark each for defining each type with or without examples)
OR
(½ mark each for mentioning example of each type)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #9/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

OR

(b) Differentiate between URL and domain name with the help of an
appropriate example.
Ans URL is the complete internet address of a webpage while Domain name is 2
just the name of the organisation/individual entity along with top-level
internet domains such as com, edu, gov, etc.

Example :
URL: [Link]
Domain Name: [Link] OR [Link]

OR
any valid definition along with examples
(2 marks for writing any one difference with the help of examples)
OR
(2 marks for writing examples to differentiate correctly)
OR
(1 mark only for writing any one difference without examples)

21. (a) Given is a Python list declaration : 1


Listofnames=["Aman","Ankit","Ashish","Rajan","Rajat"]
Write the output of :
print (Listofnames [–1:–4:–1])
Ans ['Rajat', 'Rajan', 'Ashish']

(1 mark for writing the correct output with/without formatting)


OR
(½ mark for mentioning the correct names -'Ashish', 'Rajan', 'Rajat'
but not in correct order)

(b) Consider the following tuple declaration : 1


tup1=(10,20,30,(10,20,30),40)
Write the output of :
print([Link](20))
Ans 1
(1 mark for writing the correct output)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #10/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

22. Explain the concept of ‘‘Alternate Key’’ in a Relational Database 2


Management System with an appropriate example.
Ans Alternate Keys are all the Candidate Keys of a RDBMS table, which have not
been used as a Primary Key.
Example:
RegNo AadhaarNo Name

123456 123456789012 Abraham Sen

123458 123456789123 Umeed Singh


In this example, any one of the RegNo and AadhaarNo can be used as a
Primary Key. If RegNo is used as the Primary Key then AadhaarNo is the
Alternate Key.

(2 mark for explaining Alternate Keys with example)


OR
(1 mark for writing example of Alternate Keys without any explanation)
OR
(1 mark only for writing the definition of Alternate Keys)

23. (a) Write the full forms of the following: 2


(i) HTML
(ii) TCP

Ans (i) HTML : Hyper Text Markup Language


(ii) TCP : Transmission Control Protocol
(½ mark for writing each of the two full forms)
(b) What is the need of Protocols ?
Ans Protocols are needed for communication between computers.
OR
any valid need/definition/explanation of protocol.
(1 mark for writing any one need OR definition OR explanation)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #11/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

24. (a) Write the output of the code given below : 2


def short_sub (lst,n) :
for i in range (0,n) :
if len (lst)>4:
lst [i]=lst [i]+lst[i]
else:
lst[i]=lst[i]
subject=['CS','HINDI','PHYSICS','CHEMISTRY','MATHS']
short_sub(subject,5)
print(subject)

Ans Output:
['CSCS','HINDIHINDI','PHYSICSPHYSICS','CHEMISTRYCHEMISTRY'
,'MATHSMATHS']
(2 Marks for writing the correct output with or without formatting)

OR
(b) Write the output of the code given below: 2
a =30
def call (x):
global a
if a%2==0:
x+=a
else:
x–=a
return x
x=20
print(call(35),end="#")
print(call(40),end= "@")
Ans. 65#70@
(½ marks each for the four components 65, #, 70, @ with or without
formatting)

25. (a) Differentiate between CHAR and VARCHAR data types in SQL with 2
appropriate example.

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #12/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

CHAR is of fixed length character(string) data type, which means, declaring


CHAR (10) implies to reserve spaces for 10 characters. If data does not have
10 characters (e.g., ‘CITY’ has four characters), MySQL fills the remaining 6
characters with spaces padded on the right.

VARCHAR is a variable-length character(string) data type. Declaring VARCHAR


(30) means a maximum of 30 characters can be stored but the actual
allocated bytes will depend on the length of the entered string. So ‘CITY’ in
VARCHAR (30) will occupy space needed to store 4 characters only and the
remaining 26 will be released.

OR
CHAR data type is used to store strings of fixed length, while the VARCHAR
data type is used to store strings of variable-length. Eg, to store ‘India’,
VARCHAR(20) occupies only 5 bytes whereas CHAR(20) occupies 20 bytes.

OR
any other valid difference and examples
(2 Marks for mentioning one difference with the help of examples)
OR
(1 Mark each for writing explanation of each type with example)
OR
(½ Mark for each term for mentioning only purpose without example)

OR
(b) Name any two DDL and any two DML commands. 2
DDL – CREATE, ALTER, DROP (OR any two valid DDL command)
DML – INSERT, UPDATE, DELETE, SELECT ( OR any two valid DML command)

(½ Mark each for the two DDL commands)


(½ Mark each for the two DML commands)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #13/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

SECTION-C
26 (a) Consider the following tables – LOAN and BORROWER: 1

Table : LOAN

LOAN_NO B_NAME AMOUNT

L-170 DELHI 3000

L-230 KANPUR 4000

Table : BORROWER
CUST_NAME LOAN_NO

JOHN L-171

KRISH L-230

RAVYA L-170

How many rows and columns will be there in the natural join of these two
tables ?
Ans. Rows : 2
Columns : 4
(½ Mark each for correct values of Rows and Columns)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #14/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

(b) Write the output of the queries (i) to (iv) based on the table, WORKER 2
given below:
TABLE: WORKER
W_ID F_NAME L_NAME CITY STATE

102 SAHIL KHAN KANPUR UTTAR PRADESH

104 SAMEER PARIKH ROOP NAGAR PUNJAB

105 MARY JONES DELHI DELHI

106 MAHIR SHARMA SONIPAT HARYANA

107 ATHARVA BHARDWAJ DELHI DELHI

108 VEDA SHARMA KANPUR UTTAR PRADESH

(i) SELECT F_NAME, CITY FROM WORKER ORDER BY STATE DESC;

Ans.
F_NAME CITY

SAHIL KANPUR

VEDA KANPUR

SAMEER ROOP NAGAR

MAHIR SONIPAT

MARY DELHI

ATHARVA DELHI

(½ Mark for writing the correct output)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #15/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

(ii) SELECT DISTINCT (CITY) FROM WORKER;

Ans.
CITY

KANPUR

ROOP NAGAR

DELHI

SONIPAT

(½ Mark for writing the correct output)

(iii) SELECT F_NAME, STATE FROM WORKER WHERE L_NAME


LIKE '_HA%';
Ans.
F_NAME STATE

SAHIL UTTAR PRADESH

MAHIR HARYANA

ATHARVA DELHI

VEDA UTTAR PRADESH

(½ Mark for writing the correct output)

(iv) SELECT CITY, COUNT (*) FROM WORKER GROUP BY CITY;

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #16/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

Ans.
CITY COUNT (*)

KANPUR 2

ROOP NAGAR 1

DELHI 2

SONIPAT 1

(½ Mark for writing the correct output)

Note for (i) to (iv) :


1. Ignore the output header and cases of the outputs
2. ½ mark for each query, for writing any 2 correct rows in the
output
3. Order of the output rows/columns should be ignored.

27. (a) Write the definition of a Python function named LongLines( ) which 3
reads the contents of a text file named '[Link]' and displays those
lines from the file which have at least 10 words in it. For example, if the
content of '[Link]' is as follows :

Once upon a time, there was a woodcutter


He lived in a little house in a beautiful, green wood.
One day, he was merrily chopping some wood.
He saw a little girl skipping through the woods, whistling
happily.
The girl was followed by a big gray wolf.

Then the function should display output as :

He lived in a little house in a beautiful, green wood.


He saw a little girl skipping through the woods, whistling
happily.

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #17/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

def LongLines():
Ans. myfile=open('[Link]') # ignore 'r' mode
all_lines=[Link]()
for aline in all_lines:
if(len([Link]()>=10):
print(aline)
[Link]()

OR

def LongLines():
with open ('[Link]') as myfile: # ignore 'r' mode
all_lines=[Link]()
for aline in all_lines:
if(len([Link]())>=10):
print(aline)
OR

def LongLines():
myfile=open('[Link]') # ignore 'r' mode
for aline in myfile:
if(len([Link]())>=10):
print(aline)
[Link]()

OR

def LongLines():
myfile=open('[Link]') # ignore 'r' mode
s1=" "
while s1:
s1=[Link]()
words=[Link]()
if(len(words)>=10):
print(s1)
[Link]()

OR

any other valid Python code to serve the purpose.

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #18/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

(½ mark for the function header)


(½ mark for opening the file)
(½ mark for reading the file correctly)
(1 mark for checking the number of words in each line)
(½ mark for displaying the desired lines)

OR
(b) Write a function count_Dwords() in Python to count the words ending with a 3
digit in a text file "[Link]".

Example:
If the file content is as follows:
On seat2 VIP1 will sit and
On seat1 VVIP2 will be sitting
Output will be:
Number of words ending with a digit are 4

Ans. def count_Dwords():


with open ("[Link]", 'r') as F: # ignore 'r'
S=[Link]()
Wlist = [Link]()
count = 0
for W in Wlist:
if W[-1].isdigit():
count+=1
print("Number of words ending with a digit are",count)

OR
def count_Dwords():
count=0
myfile=open("[Link]")
S=[Link]()
Wlist=[Link]()
for W in Wlist:
if i[-1] in "0123456789":
count=count+1
[Link]()
print("Number of words ending with a digit are",count)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #19/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

OR

def count_Dwords():
myfile=open("[Link]")
count=0
for line in myfile:
s1=[Link]()
for i in s1:
if i[-1] in "0123456789":
count=count+1
print("Number of words ending with a digit are",count)
[Link]()

OR

any other valid Python code to serve the purpose.

(½ mark for the function header)


(½ mark for opening the file)
(½ mark for reading the file correctly)
(1 mark for checking the condition)
(½ mark for displaying the desired lines)

28. (a) Write the outputs of the SQL queries (i) to (iv) based on the relations 2
COMPUTER and SALES given below :

Table : COMPUTER

PROD_ID PROD_NAME PRICE COMPANY TYPE

P001 MOUSE 200 LOGITECH INPUT

P002 LASER PRINTER 4000 CANON OUTPUT

P003 KEYBOARD 500 LOGITECH INPUT

P004 JOYSTICK 1000 IBALL INPUT

P005 SPEAKER 1200 CREATIVE OUTPUT

P006 DESKJET PRINTER 4300 CANON OUTPUT

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #20/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

Table : SALES
PROD_ID QTY_SOLD QUARTER

P002 4 1

P003 2 2

P001 3 2

P004 2 1

(i) SELECT MIN(PRICE), MAX(PRICE) FROM COMPUTER;


Ans.
MIN(PRICE) MAX(PRICE)

200 4300

(½ mark for correct output)

(ii) SELECT COMPANY, COUNT(*) FROM COMPUTER GROUP BY


COMPANY HAVING COUNT(COMPANY) > 1;
Ans.
COMPANY COUNT(*)

LOGITECH 2

CANON 2

(½ mark for correct output)


(iii) SELECT PROD_NAME, QTY_SOLD FROM COMPUTER C, SALES S
WHERE C.PROD_ID=S.PROD_ID AND TYPE = 'INPUT';
Ans.
PROD_NAME QTY_SOLD

MOUSE 3

KEYBOARD 2

JOYSTICK 2

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #21/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

(½ mark for correct output)


(iv) SELECT PROD_NAME, COMPANY, QUARTER FROM COMPUTER C,
SALES S WHERE C.PROD_ID=S. PROD_ID;

PROD_NAME COMPANY QUARTER

MOUSE LOGITECH 2

LASER PRINTER CANON 1

KEYBOARD LOGITECH 2

JOYSTICK IBALL 1

(½ mark for correct output)


(b) Write the command to view all databases. 1
Ans. SHOW DATABASES;

(1 mark for writing the correct command)


Note: punctuation mark (;) and cases can be ignored.

29. Write a function EOReplace() in Python, which accepts a list L of numbers. 3


Thereafter, it increments all even numbers by 1 and decrements all odd
numbers by 1.
Example :
If Sample Input data of the list is :
L=[10,20,30,40,35,55]
Output will be :
L=[11,21,31,41,34,54]
Ans. def EOReplace(L):
for i in range(len(L)):
if L[i]%2==0:
L[i]=L[i]+1
else:
L[i]=L[i]-1
print(L)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #22/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

OR
def EOReplace():
L=[]
ch = 'y'
while ch == 'y' or ch == 'Y':
x = int(input('give item'))
[Link](x)
ch= input('do you want to enter more y/n ')
for i in range(len(L)):
if L[i]%2==0:
L[i]=L[i]+1
else:
L[i]=L[i]-1
print(L)

OR
def EOReplace():
L=eval(input("Enter list="))
Size=len(L)
for i in range(Size):
if L[i]%2==0:
L[i]=L[i]+1
else:
L[i]=L[i]-1
print(L)

OR

any other valid Python code to serve the purpose.

(½ mark for correct function header)


(½ mark for getting the list)
(½ mark for correct loop)
(½ mark for checking the condition)
(½ mark for incrementing the even values)
(½ mark for decrementing the odd values)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #23/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

30. (a) A list contains following record of customer : 3


[Customer_name, Room Type]
Write the following user defined functions to perform given operations on
the stack named 'Hotel' :
(i) Push_Cust() – To Push customers’ names of those customers who are
staying in ‘Delux’ Room Type.

(ii) Pop_Cust() – To Pop the names of customers from the stack and
display them. Also, display “Underflow” when there are no customers in the
stack.

For example :
If the lists with customer details are as follows :
["Siddarth", "Delux"]
["Rahul", "Standard"]
["Jerry", "Delux"]
The stack should contain
Jerry
Siddharth
The output should be:
Jerry
Siddharth
Underflow
Ans. Hotel=[]
Customer=[["Siddarth","Delux"],["Rahul","Standard"],["Jer
ry","Delux"]]
def Push_Cust():
for rec in Customer:
if rec[1]=="Delux":
[Link](rec[0])

def Pop_Cust():
while len(Hotel)>0:
print([Link]())
else:
print("Underflow")

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #24/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

OR
top=0
def Push_Cust(Hotel,Customer):
global top
for cust_rec in Customer:
if cust_rec[1]=="Delux":
[Link](top, cust_rec[0])
top=top+1

def Pop_Cust(Hotel):
global top
while len(Hotel)>0:
print([Link]())
top=top-1
else:
print("Underflow")

OR
Any other valid Python code to serve the purpose.
(½ mark for defining correct function header (Push_Cust())
(½ mark for correct loop in function Push_Cust())
(½ mark for checking the condition and appending the data in
Push_Cust())
(½ mark for defining correct function header (Pop_Cust())
(½ mark for correct loop in function Pop_Cust())
(½ mark for deleting and displaying the data in Pop_Cust())

OR
(b) Write a function in Python, Push (Vehicle) where, Vehicle is a 3
dictionary containing details of vehicles – {Car_Name: Maker}.
The function should push the name of car manufactured by ‘TATA’
(including all the possible cases like Tata, TaTa, etc.) to the stack.
For example:
If the dictionary contains the following data :
Vehicle={"Santro":"Hyundai","Nexon":"TATA","Safari":"Tata"}
The stack should contain
Safari
Nexon

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #25/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

Ans stack=[]
def Push(Vehicle) :
for v_name in Vehicle :
if Vehicle[v_name].upper()=="TATA" :
[Link](v_name)
OR
stack=[]
def Push(Vehicle) :
for v_name in Vehicle :
if Vehicle[v_name] in ("TATA", "TaTa","tata","Tata"):
[Link](v_name)
OR
Any other valid Python code to serve the purpose.
(½ mark for defining correct function header)
(½ mark for correct loop )
(1 mark for checking the condition )
(1 mark for appending the data)

SECTION - D
31 Quickdev, an IT based firm, located in Delhi is planning to set up a network
for its four branches within a city with its Marketing department in Kanpur.
As a network professional, give solutions to the questions (i) to (v), after
going through the branches locations and other details which are given below:

Distance between various branches is as follows :

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #26/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

Number of computers in each of the branches :

(i) Suggest the most suitable place to install the server for the Delhi branch 1
with a suitable reason.
Branch D, as it has maximum number of computers
Ans OR any other location with valid justification

(½ mark for naming the Branch and ½ mark for correct justification)

(ii) Suggest an ideal layout for connecting all these branches within Delhi. 1
Ans

(Based on Server Location)


OR

(Based on minimum distance between branches)


(1 mark for correctly drawing any one valid layout)
OR
(1 mark for correctly suggesting name of any one valid topology)

(iii) Which device will you suggest, that should be placed in each of these 1
branches to efficiently connect all the computers within these branches ?
Ans. Switch/Hub/Router
(1 mark for suggesting the correct device)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #27/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

(iv) Delhi firm is planning to connect to its Marketing department in Kanpur which 1
is approximately 300 km away. Which type of network out of LAN, WAN or
MAN will be formed ? Justify your answer.
Ans. WAN – as the network is spread across different geographical locations of the
country.
(½ mark for writing the correct type of network)
(½ mark for correct justification)

(v) Suggest a protocol that shall be needed to provide help for transferring of 1
files between Delhi and Kanpur branch.
Ans. FTP
(1 mark for writing the correct answer as FTP)
OR
(1 mark for any other valid protocol that can be used to provide help
for transferring of files)

32 (a) What possible output(s) are expected to be displayed on screen at the time 2
of execution of the following program :

import random
M=[5,10,15,20,25,30]
for i in range(1,3):
first=[Link](2,5)–1
sec=[Link](3,6)–2
third=[Link](1,4)
print(M[first], M[sec], M[third],sep="#")

(i) 10#25#15 (ii) 5#25#20


20#25#25 25#20#15
(iii) 30#20#20 (iv) 10#15#25#
20#25#25 15#20#10#

Ans. (i) 10#25#15


20#25#25

(2 marks for the correct answer)


(Deduct ½ mark each for any other additional option along with correct
option)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #28/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

(b) The code given below deletes the record from the table employee which 3
contains the following record structure:

E_code - String
E_name - String
Sal – Integer
City - String
Note the following to establish connectivity between Python and MySQL :
· Username is root
· Password is root
· The table exists in a MySQL database named emp.
· The details (E_code,E_name,Sal,City) are the attributes of the
table.
Write the following statements to complete the code :
Statement 1 – to import the desired library.
Statement 2 – to execute the command that deletes the record with
E_code as 'E101'.
Statement 3 – to delete the record permanently from the database.

import __________ as mysql # Statement 1


def delete() :
mydb=[Link](host="localhost",user="root",
passwd="root",database="emp")

mycursor=[Link]()
_________________ # Statement 2
_________________ # Statement 3
print ("Record deleted")

Ans. Statement 1 : [Link]


OR any other valid library used for
Python MySQL connectivity
Statement 2: [Link]("DELETE FROM employee
WHERE E_code='E101'")
Statement 3 : [Link]()

(1 mark for writing any valid library for Statement 1)


(½ mark for writing correct object & function name in Statement 2)
(½ mark for writing correct Query in Statement 2)
(½ mark for writing correct object name in Statement 3)
(½ mark for writing correct function name in Statement 3)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #29/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

OR

(a) Predict the output of the code given below : 2


def makenew(mystr) :
newstr=""
count=0
for i in mystr :
if count%2!=0:
newstr=newstr+str(count)
else :
if [Link]():
newstr=newstr+[Link]()
else:
newstr=newstr+i
count+=1
print(newstr)
makenew("No@1")
Ans. N1@3

(½ mark for writing each correct character with or without formatting)

(b) The code given below reads the following records from the table employee
and displays only those records who have employees coming from city
‘Delhi’:
E_code – String
E_name - String
Sal - Integer
City - String
Note the following to establish connectivity between Python and MySQL :
• Username is root
• Password is root
• The table exists in a MySQL database named emp.
• The details (E_code,E_name,Sal,City) are the attributes
of the table.

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #30/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

Write the following statements to complete the code : 3


Statement 1 – to import the desired library.
Statement 2 – to execute the query that fetches records of the employees
coming from city ‘Delhi’.
Statement 3 – to read the complete data of the query (rows whose city is
Delhi) into the object named details, from the table employee in
the database.

import _____________ as mysql # Statement 1


def display():
mydb=[Link](host="localhost",user="root",
passwd="root",database="emp")
mycursor=[Link]()
____________________________ # Statement 2
details = ___________________ # Statement 3
for i in details:
print (i)

Statement 1: [Link]
Ans. OR any other valid library used for
Python MySQL connectivity
Statement 2: [Link]("select * from employee
where City='Delhi '")
Statement 3: [Link]()

(1 mark for writing any valid library for Statement 1)


(½ mark for writing correct object & function name in Statement 2)
(½ mark for writing correct Query in Statement 2)
(½ mark for writing correct object name in Statement 3)
(½ mark for writing correct function name in Statement 3)

33 (a) Write one difference between CSV and text files. 5


Write a program in Python that defines and calls the following user defined
functions:
(i) COURIER_ADD() : It takes the values from the user and adds
the details to a csv file '[Link]'. Each record consists of
a list with field elements as cid, s_name, Source,
destination to store Courier ID, Sender name, Source and
destination address respectively.
(ii) COURIER_SEARCH() : Takes the destination as the input and
displays all the courier records going to that destination.

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #31/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

Ans CSV files


● can be viewed in spreadsheets
● module CSV has to be imported
Text files
● can be viewed in the text editor
● No specific module required to be imported
(any other valid difference - any one)

import csv
def COURIER_ADD() :
f1=open("[Link]","a",newline="\n")
writ=[Link](f1)
cid=int(input("Enter the Courier id"))
s_name=input ("Enter the Sender Name")
Source=input("Enter the Source Address")
destination=input("Enter Destination Name")
detail=[cid,s_name,Source,destination]
[Link] (detail)
[Link]()

def COURIER_SEARCH() :
f1=open("[Link]","r") # ignore newline
detail=[Link](f1)
name=input("Enter the Destination Name to be searched")
for i in detail :
if i[3]==name:
print("Details of courier are: ",i)
COURIER_ADD()
COURIER_SEARCH()

OR
Any other valid Python code to serve the purpose.
(1 mark for any one correct difference between CSV and Text file)

(½ mark for correctly importing csv module)


(½ mark for opening in the file in right mode in COURIER_ADD())
(½ mark for reading values from the user)
(½ marks correct uses of writerow/writerows)
(½ mark for opening in the file in right mode in COURIER_SEARCH())
(½ marks correct uses of reader object)
(½ mark for displaying desired output)
(½ mark for correctly calling COURIER_ADD()
and COURIER_SEARCH())
OR
[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #32/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

(b) Why is it important to close a file before exiting ?


Write a program in Python that defines and calls the following user defined
functions : 5
(i) Add_Book() : Takes the details of the books and adds them to a
csv file ‘[Link]’. Each record consists of a list with field
elements as book_ID, B_name and pub to store book ID, book
name and publisher respectively.
(ii) Search_Book() : Takes publisher name as input and counts and
displays number of books published by them.
Ans It is important to close the file before exiting as Python makes sure that any
unwritten or unsaved data is flushed off to the file before it is closed.

import csv
def Add_Book():
f1=open("[Link]","a",newline="\n")
writ=[Link](f1)
book_ID=int(input("Enter the Book id"))
B_name=input("Enter the Book Name")
pub=input("Enter the Publisher Name")
detail=[book_ID, B_name,pub]
[Link](detail)
[Link]()

def Search_Book ():


f1=open("[Link]","r") # ignore newline
detail=[Link](f1)
name=input("Enter the Publisher Name to be searched")
pub_count=0
for i in detail :
if i[2]==name:
pub_count+=1
print("NUMBER OF BOOKS: ",pub_count)

Add_Book()
Search_Book()

OR

Any other valid Python code to serve the purpose.

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #33/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

(1 mark for writing correct purpose of closing a file)

(½ mark for correctly importing csv module)


(½ mark for opening in the file in right mode in Add_Book())
(½ mark for reading values from the user)
(½ marks correct uses of writerow/writerows)
(½ mark for opening in the file in right mode in Search_Book())
(½ marks correct uses of reader object)
(½ mark for displaying desired output)
(½ mark for correctly calling Add_Book() and Search_Book() )

SECTION E
34 The school has asked their estate manager Mr. Rahul to maintain the data of
all the labs in a table LAB. Rahul has created a table and entered data of 5
labs.

Based on the data given above, answer the following questions :

(i) Identify the columns which can be considered as Candidate keys. 1


Ans. Candidate keys: LABNO and LAB_NAME
(1 Mark for correctly writing both names of Candidate keys)
OR
(½ Mark for specifying any one candidate key correctly)

(ii) Write the degree and cardinality of the table. 1


Ans Degree = 5
Cardinality = 5
(½ Mark for writing value of Degree correctly)
(½ Mark for writing value of Cardinality correctly)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #34/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

(iii) Write the statements to: 2


(a) Insert a new row with appropriate data.
(b) Increase the capacity of all the labs by 10 students which are on ‘I’
Floor.
Ans (a) INSERT INTO LAB
VALUES('L006','PHYSICS','RAVI',25,'II');

(b) UPDATE LAB SET CAPACITY=CAPACITY+10 WHERE FLOOR='I';

(½ Mark for writing the INSERT INTO LAB part correctly)


(½ Mark for writing the VALUES part correctly)

(½ Mark for writing the UPDATE LAB SET part correctly)


(½ Mark for writing the CAPACITY=CAPACITY+10 WHERE FLOOR="I"
part correctly)
OR
(Option for part (iii) only)
(iii) Write the statements to : 2
(a) Add the constraint PRIMARY KEY to a column LABNO in the table.
(b) Delete the table LAB.
Ans (a) ALTER TABLE LAB ADD PRIMARY KEY (LABNO);
(b) DROP TABLE LAB;
(a) (½ Mark for writing ALTER TABLE LAB part correctly)
(½ Mark for writing ADD PRIMARY KEY(LABNO) part correctly)

(b) (1 Mark for writing query correctly)

35 Shreyas is a programmer, who has recently been given a task to write a user
defined function named write_bin() to create a binary file called
Cust_file.dat containing customer information – customer number (c_no),
name (c_name), quantity (qty), price (price) and amount (amt) of each
customer.

The function accepts customer number, name, quantity and price.


Thereafter, it displays the message ‘Quantity less than 10 ….. Cannot SAVE’,
if quantity entered is less than 10. Otherwise the function calculates amount
as price * quantity and then writes the record in the form of a list into the
binary file.

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #35/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

import pickle
def write_bin():
bin_file=_______ #Statement 1
while True:
c_no=int(input("enter customer number"))
c_name=input("enter customer name")
qty=int(input("enter qty"))
price=int(input("enter price"))
if ________ #Statement 2
print("Quantity less than 10..Cannot SAVE")
else:
amt=price * qty
c_detail=[c_no,c_name,qty,price,amt]
________ #Statement 3
ans=input("Do you wish to enter more records y/n")
if [Link]()=='n':
________ #Statement 4
_________________ #Statement 5
______________________ #Statement 6

(i) Write the correct statement to open a file 'Cust_file.dat' for writing the data 1
of the customer.
Ans Statement 1: open ("Cust_file.dat", "wb")
(1 Mark for correctly writing missing Statement 1)

Note: 'ab' mode also be considered

(ii) Which statement should Shreyas fill in Statement 2 to check whether quantity 1
is less than 10.
Ans Statement 2: qty<10 :
(1 Mark for correctly writing missing Statement 2)

(iii) Which statement should Shreyas fill in Statement 3 to write data to the binary 2
file and in Statement 4 to stop further processing if the user does not wish to
enter more records.
Ans Statement 3: [Link](c_detail,bin_file)
Statement 4: break
(1 Mark for correctly writing missing Statement 3)
(1 Mark for correctly writing missing Statement 4)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #36/37]
MARKING SCHEME OF CLASS XII COMPUTER SCIENCE (083) - 2023

OR
(Option only for part (iii))
(iii) What should Shreyas fill in Statement 5 to close the binary file named 2
Cust_file.dat and in Statement 6 to call a function to write data in binary
file?
Ans Statement 5: bin_file.close()
Statement 6: write_bin()
(1 Mark for correctly writing missing Statement 5)
(1 Mark for correctly writing missing Statement 6)

[Sub Code: 083 Series: HFG1E Paper Code: 91 SET-4] [Page #37/37]
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Marking Scheme
Strictly Confidential
(For Internal and Restricted use only)
Senior Secondary School Certificate Examination, 2024
Subject Name: Computer Science (Q.P. CODE 91)
1 You are aware that evaluation is the most important process in the actual and correct
assessment of the candidates. A small mistake in evaluation may lead to serious problems which
may affect the future of the candidates, education system and teaching profession. To avoid
mistakes, it is requested that before starting evaluation, you must read and understand the spot
evaluation guidelines carefully.

2 “Evaluation policy is a confidential policy as it is related to the confidentiality of the


examinations conducted, Evaluation done and several other aspects. Its’ leakage to public in any
manner could lead to derailment of the examination system and affect the life and future of
millions of candidates. Sharing this policy/document to anyone, publishing in any magazine and
printing in News Paper/Website etc. may invite action under various rules of the Board and IPC.”

3 Evaluation is to be done as per instructions provided in the Marking Scheme. It should not be
done according to one’s own interpretation or any other consideration. Marking Scheme should
be strictly adhered to and religiously followed. However, while evaluating, answers which are
based on latest information or knowledge and/or are innovative, they may be assessed for their
correctness otherwise and due marks be awarded to them. In class-XII, while evaluating two
competency-based questions, please try to understand given answer and even if reply is not from
marking scheme but correct competency is enumerated by the candidate, due marks should be
awarded.

4 The Marking scheme carries only suggested value points for the answers
These are in the nature of Guidelines only and do not constitute the complete answer. The
students can have their own expression and if the expression is correct, the due marks should be
awarded accordingly.

5 The Head-Examiner must go through the first five answer books evaluated by each evaluator on
the first day, to ensure that evaluation has been carried out as per the instructions given in the
Marking Scheme. If there is any variation, the same should be zero after deliberation and
discussion. The remaining answer books meant for evaluation shall be given only after ensuring
that there is no significant variation in the marking of individual evaluators.

6 Evaluators will mark( √ ) wherever answer is correct. For wrong answer CROSS ‘X’ be marked.
Evaluators will not put right (✓)while evaluating which gives an impression that answer is
correct and no marks are awarded. This is most common mistake which evaluators are committing.

7 If a question has parts, please award marks on the right-hand side for each part. Marks awarded
for different parts of the question should then be totaled up and written in the left-hand margin
and encircled. This may be followed strictly.

8 If a question does not have any parts, marks must be awarded in the left-hand margin and
encircled. This may also be followed strictly.

9 If a student has attempted an extra question, answer of the question deserving more marks
should be retained and the other answer scored out with a note “Extra Question”.

10 No marks to be deducted for the cumulative effect of an error. It should be penalized only once.

11 A full scale of marks 70 marks as given in Question Paper has to be used. Please do not hesitate
to award full marks if the answer deserves it.

Page 1/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
12 Every examiner has to necessarily do evaluation work for full working hours i.e., 8 hours every
day and evaluate 20 answer books per day in main subjects and 25 answer books per day in other
subjects (Details are given in Spot Guidelines).This is in view of the reduced syllabus and number
of questions in question paper.

13 Ensure that you do not make the following common types of errors committed by the Examiner
in the past:-
● Leaving answer or part thereof unassessed in an answer book.
● Giving more marks for an answer than assigned to it.
● Wrong totaling of marks awarded on an answer.
● Wrong transfer of marks from the inside pages of the answer book to the title page.
● Wrong question wise totaling on the title page.
● Wrong totaling of marks of the two columns on the title page.
● Wrong grand total.
● Marks in words and figures not tallying/not same.
● Wrong transfer of marks from the answer book to online award list.
● Answers marked as correct, but marks not awarded. (Ensure that the right tick mark is
correctly and clearly indicated. It should merely be a line. Same is with the X for incorrect
answer.)
● Half or a part of answer marked correct and the rest as wrong, but no marks awarded.

14 While evaluating the answer books if the answer is found to be totally incorrect, it should be
marked as cross (X) and awarded zero (0)Marks.

15 Any unassessed portion, non-carrying over of marks to the title page, or totaling error detected
by the candidate shall damage the prestige of all the personnel engaged in the evaluation work
as also of the Board. Hence, in order to uphold the prestige of all concerned, it is again
reiterated that the instructions be followed meticulously and judiciously.

16 The Examiners should acquaint themselves with the guidelines given in the “Guidelines for Spot
Evaluation” before starting the actual evaluation.

17 Every Examiner shall also ensure that all the answers are evaluated, marks carried over to the
title page, correctly totaled and written in figures and words.

18 The candidates are entitled to obtain photocopy of the Answer Book on request on payment of
the prescribed processing fee. All Examiners/Additional Head Examiners/Head Examiners are
once again reminded that they must ensure that evaluation is carried out strictly as per value
points for each answer as given in the Marking Scheme.
SPECIFIC INSTRUCTIONS FOR COMPUTER SCIENCE ONLY
1 In Python, string content is accepted within a pair of single quotes ' ' or within a pair of
double quotes " ".

2 In MySQL, CHAR/VARCHAR/DATE type content is accepted within a pair of single quotes ' ' or
within a pair of double quotes " ".

3 In MySQL commands, lowercase/UPPERCASE both are correct.

4 In MySQL output questions, column headings to be ignored.

5 In MySQL output questions, alignment (left/right) of content to be ignored.

6 All answers/codes are suggestive, any other alternative correct answers to be accepted.

Page 2/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4

General Instructions:
(i) Please check this question paper which contains 35 questions.
(ii) The paper is divided into 5 Sections - A, B, C, D and E.
(iii) Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
(iv) Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
(v) Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
(vi) Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
(vii) Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
(viii) All programming questions are to be answered using Python Language only.

SECTION-A
1. State True or False : 1

While defining a function in Python, the positional parameters in the function header must
always be written after the default parameters.

Ans False

(1 Mark for the correct answer)

2. The SELECT statement when combined with ___ clause, returns records without repetition. 1

(a) DISTINCT (b) DESCRIBE

(c) UNIQUE (d) NULL

Ans (a) DISTINCT

(1 Mark for the correct answer)

3. What will be the output of the following statement : 1

print (16*5/4*2/5–8)

(a) – 3.33 (b) 6.0

(c) 0.0 (d) –13.33

Ans (c) 0.0

(1 Mark for the correct answer)

4. What possible output from the given options is expected to be displayed when the 1
following Python code is executed ?

import random
Signal=['RED','YELLOW','GREEN']
for K in range (2, 0, – 1) :
R = [Link](K)
print (Signal[R], end = '#')

Page 3/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
(a) YELLOW # RED # (b) RED # GREEN #

(c) GREEN # RED # (d) YELLOW # GREEN #

Ans (a) YELLOW # RED #

(1 Mark for the correct answer)

5. In SQL, the aggregate function which will display the cardinality of the table is __________. 1
(a) sum() (b) count(*)

(c) avg() (d) sum(*)

Ans (b) count(*)

(1 Mark for the correct answer)

6. Which protocol out of the following is used to send and receive emails over a computer 1
network ?
(a) PPP (b) HTTP

(c) FTP (d) SMTP

Ans (d) SMTP

(1 Mark for the correct answer)

7. Identify the invalid Python statement from the following : 1


(a) d = dict() (b) e = {}

(c) f = [] (d) g = dict{}

Ans (d) g = dict{}

(1 Mark for the correct answer)

8. Consider the statements given below and then choose the correct output from the given 1
options :
myStr = "MISSISSIPPI"
print(myStr[:4]+"#"+myStr[–5:])
(a) MISSI#SIPPI (b) MISS#SIPPI

(c) MISS#IPPIS (d) MISSI#IPPIS

Ans (b) MISS#SIPPI

(1 Mark for the correct answer)

9. Identify the statement from the following which will raise an error : 1
(a) print("A"*3) (b) print(5*3)

(c) print("15" + 3) (d) print("15" + "13")

Page 4/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans (c) print("15" + 3)

(1 Mark for the correct answer)

10. Select the correct output of the following code : 1

event="G20 Presidency@2023"
L=[Link](' ')
print(L[::–2])
(a) 'G20' (b) ['Presidency@2023']

(c) ['G20'] (d) 'Presidency@2023'

Ans (b) ['Presidency@2023']

(1 Mark for the correct answer)

11. Which of the following options is the correct unit of measurement for network bandwidth ? 1
(a) KB (b) Bit

(c) Hz (d) Km

Ans (c) Hz

(1 Mark for the correct answer)

12. Observe the given Python code carefully : 1

a=20
def convert(a):
b=20
a=a+b

convert(10)
print(a)

Select the correct output from the given options :


(a) 10 (b) 20

(c) 30 (d) Error

Ans (b) 20

(1 Mark for the correct answer)

13. State whether the following statement is True or False: 1


While handling exceptions in Python, name of the exception has to be compulsorily added
with except clause.

Ans False

(1 Mark for the correct answer)

Page 5/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
14. Which of the following is not a DDL command in SQL ? 1
(a) DROP (b) CREATE

(c) UPDATE (d) ALTER

Ans (c) UPDATE

(1 Mark for the correct answer)

15. Fill in the blank : 1


___________ is a set of rules that needs to be followed by the communicating parties in
order to have a successful and reliable data communication over a network.

Ans Protocol
OR
Name of any protocol

(1 Mark for the correct answer as protocol or name of any protocol)

16. Consider the following Python statement : 1

F=open('[Link]')

Which of the following is an invalid statement in Python ?


(a) [Link](1,0) (b) [Link](0,1)

(c) [Link](0,-1) (d) [Link](0,2)

Ans (c) [Link] (0,–1)

(1 Mark for the correct answer)

Q. 17 and 18 are ASSERTION (A) and REASONING (R) based questions.


Mark the correct choice as
(a) Both (A) and (R) are true and (R) is the correct explanation for (A).

(b) Both (A) and (R) are true and (R) is not the correct explanation for (A).

(c) (A) is true but (R) is false.

(d) (A) is false but(R) is true.

17 Assertion (A) : CSV file is a human readable text file where each line has a number of fields, 1
separated by comma or some other delimiter.
Reason (R): writerow() method is used to write a single row in a CSV file.

Ans (b) Both (A) and (R) are true and (R) is not the correct explanation for (A).

(1 Mark for the correct answer)

18 Assertion (A): The expression "Hello".sort() in Python will give an error. 1

Reason (R): sort() does not exist as a method/function for strings in Python.

Page 6/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans (a) Both (A) and (R) are true and (R) is the correct explanation for (A).

(1 Mark for the correct answer)

SECTION-B
19 (A) (i) Expand the following terms: 2
XML ,PPP
(ii) Give one difference between circuit switching and packet switching.

OR
(B) (i) Define the term web hosting.
(ii) Name any two web browsers.

Ans (A) (i) eXtensible Markup Language


Point-to-Point Protocol

(½ Mark for writing correct expansion of XML)


(½ Mark for writing correct expansion of PPP)

Ans (ii)
Circuit Switching Packet Switching
A dedicated path is established between Data to be transmitted is divided into small
the sender and the receiver before packets which are transmitted via nearest
starting data transmission. Entire data is service provider till all packets reach the
transmitted in one go. recipient where the packets are reassembled.

(½ Mark for writing correct technique for Circuit Switching)


(½ Mark for writing correct technique for Packet Switching)

OR

Ans (B) (i) Web hosting is a service that allows users to put a website or a webpage onto the
internet, and make it a part of the World Wide Web.
(1 Mark for writing the correct definition of Web hosting)

(ii) Google Chrome,Microsoft Edge, Safari, Mozilla Firefox, Opera etc.

(1 mark for writing names of any two web browsers)

20 The code given below accepts five numbers and displays whether they are even or odd: 2
Observe the following code carefully and rewrite it after removing all syntax and logical
errors :
Underline all the corrections made.
def EvenOdd()
for i in range(5) :
num=int(input("Enter a number")
if num/2==0:
print("Even")
else:
print("Odd")
EvenOdd()

Page 7/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans def EvenOdd(): # Error 1
for i in range(5) :
num=int(input("Enter a number")) # Error 2
if num%2==0: # Error 3
print("Even")
else:
print("Odd") # Error 4
EvenOdd()

(½ Mark for each correction made)

21. (A) Write a user defined function in Python named showGrades(S) which takes the 2
dictionary S as an argument. The dictionary, S contains Name:[Eng,Math,Science] as
key:value pairs. The function displays the corresponding grade obtained by the
students according to the following grading rules :

For example : Consider the following dictionary


S={"AMIT":[92,86,64],"NAGMA":[65,42,43],"DAVID":[92,90,88]}
The output should be :
AMIT – B
NAGMA – C
DAVID – A

Ans def showGrades(S):


for K, V in S. items():
if sum(V)/3>=90:
Grade="A"
elif sum(V)/3>=60:
Grade="B"
else:
Grade="C"
print(K,"–",Grade)
S={"AMIT":[92,86,64],"NAGMA":[65,42,43],"DAVID":[92,90,88]}
showGrades(S)

OR
def showGrades(S):
for K in S:
Sum=0
for i in range(3):
Sum+=S[K][i]
if Sum/3>=90:
Grade="A"
elif Sum/3>=60:
Grade="B"
else:
Grade="C"
print(K,"–",Grade)
S={"AMIT":[92,86,64],"NAGMA":[65,42,43],"DAVID":[92,90,88]}
showGrades(S)

Page 8/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
OR
Any other correct variation of the code

(½ Mark for the loop to process individual students from the dictionary)
(1 Mark for calculating grades)
(½ Mark for displaying grades)

OR

(B) Write a user defined function in Python named Puzzle(W,N) which takes the
argument W as an English word and N as an integer and returns the string where
every Nth alphabet of the word W is replaced with an underscore ("_").
For example : if W contains the word "TELEVISION" and N is 3, then the function
should return the string "TE_EV_SI_N". Likewise for the word "TELEVISION" if
N is 4, then the function should return "TEL_VIS_ON".

Ans Word="TELEVISION"
def Puzzle(W, N):
NW=""
Count=1
for Ch in W:
if Count!=N:
NW+=Ch
Count+=1
else:
NW+="_"
Count=1
return NW
print(Puzzle(Word,3))

OR
def Puzzle(W,N):
W1=""
for i in range(len(W)):
if (i+1)%N==0:
W1=W1+"_"
else:
W1=W1+W[i]
return W1
print(Puzzle("TELEVISION",4))

OR
Any other correct variation of the code

(½ Mark for the loop to process individual (or Nth) characters)


(1 Mark for changing/replacing the required characters)
(½ Mark for returning the new word)

22. Write the output displayed on execution of the following Python code : 2
LS=["HIMALAYA","NILGIRI","ALASKA","ALPS"]
D={}
for S in LS :
if len(S)%4 == 0:
D[S] = len(S)
for K in D :
print(K,D[K], sep = "#")

Page 9/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans HIMALAYA#8
ALPS#4

(1 Mark for each line of output)


(Deduct ½ Mark if the entire output is correct but the formatting or line break or
separating characters is/are incorrect)

23. (A) Write the Python statement for each of the following tasks using built-in 1+1=2
functions/methods only :
(i) To remove the item whose key is "NISHA" from a dictionary named Students.
For example, if the dictionary Students contains
{"ANITA":90, "NISHA":76, "ASHA":92}, then after removal the dictionary
should contain{"ANITA":90,"ASHA":92}

(ii) To display the number of occurrences of the substring "is" in a string named
message.
For example if the string message contains "This is his book", then the
output will be 3.

Ans (A) (i)


[Link]("NISHA")
OR
del(Students["NISHA"])
OR
del Students["NISHA"]
OR
Any other correct variation of the code

(ii)
print([Link]("is"))
OR
[Link]("is")
OR
Any other correct variation of the code

(1 Mark for each correct command)

OR

(B) A tuple named subject stores the names of different subjects. Write the Python
commands to convert the given tuple to a list and thereafter delete the last element
of the list.

Ans (B) subject=list(subject)


[Link]()
OR
subject=list(subject)
[Link](-1)
OR
subject=list(subject)
del(subject[-1])
OR
subject=list(subject)
del subject[-1]

Page 10/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
OR
Any other correct variation of the code

(1 Mark for correctly converting to list)


(1 Mark for correctly popping the last element/name)

24. (A) Ms. Veda created a table named Sports in a MySQL database, containing columns 2
Game_id, P_Age and G_name.
After creating the table, she realized that the attribute, Category has to be
added. Help her to write a command to add the Category column. Thereafter,
write the command to insert the following record in the table :

Game_id : G42
P_Age : Above 18
G_name : Chess
Category : Senior

Ans (A) ALTER TABLE SPORTS


ADD CATEGORY VARCHAR(10);
OR
ALTER TABLE SPORTS
ADD COLUMN CATEGORY VARCHAR(10);
OR
ALTER TABLE SPORTS
ADD CATEGORY CHAR(10);
OR
ALTER TABLE SPORTS
ADD COLUMN CATEGORY CHAR(10);

INSERT INTO SPORTS


VALUES("G42","Above 18","Chess","Senior");
OR
INSERT INTO SPORTS(Game_id, P_Age, G_name, Category)
VALUES("G42","Above 18","Chess","Senior");

(½ Mark for ALTER TABLE command)


(½ Mark for ADD CATEGORY part)
(½ Mark for INSERT INTO command)
(½ Mark for VALUES part )

OR

(B) Write the SQL commands to perform the following tasks :


(i) View the list of tables in the database, Exam.
(ii) View the structure of the table, Term1.

Ans (B) (i) SHOW TABLES;


(ii) DESCRIBE Term1
OR
DESC Term1
Note: Ignore USE Exam; if not written

(1 Mark for each correct command)

Page 11/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
25 Predict the output of the following code : 2
def callon(b=20,a=10) :
b=b+a
a=b-a
print(b, "#" , a )
return b
x=100
y=200
x=callon(x,y)
print (x,"@", y)
y=callon(y)
print (x,"@",y)

Ans 300#100
300@200
210#200
300@210

( ½ Mark for each line of correct output)

(Deduct ½ mark only if all the numeric parts of the output are correct but
formatting or/and separators are incorrect)

SECTION C
26. Write the output on execution of the following Python code: 3
S="Racecar Car Radar"
L=[Link]()
for W in L :
x=[Link]()
if x==x[::-1]:
for I in x:
print(I,end="*")
else:
for I in W:
print(I,end="#")
print()

Ans R*A*C*E*C*A*R*
C#a#r#
R*A*D*A*R*

(1 Mark for each line of correct output)

Note:
● Deduct ½ mark only if all the alphabets are correct but some cases -
lower/upper are incorrectly written
● Deduct ½ mark only if all the alphabets are correct but separators - */#
are incorrectly written OR new line not considered

Page 12/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
27 Consider the table ORDERS given below and write the output of the SQL queries that 1x3
=3
follow:
ORDNO ITEM QTY RATE ORDATE
1001 RICE 23 120 2023-09-10
1002 PULSES 13 120 2023-10-18
1003 RICE 25 110 2023-11-17
1004 WHEAT 28 65 2023-12-25
1005 PULSES 16 110 2024-01-15
1006 WHEAT 27 55 2024-04-15
1007 WHEAT 25 60 2024-04-30

(i) SELECT ITEM, SUM(QTY) FROM ORDERS GROUP BY ITEM;


(ii) SELECT ITEM, QTY FROM ORDERS WHERE ORDATE BETWEEN
'2023-11-01' AND '2023-12-31';
(iii) SELECT ORDNO, ORDATE FROM ORDERS WHERE ITEM = 'WHEAT'
AND RATE>=60 ;

Ans (i)
ITEM SUM(QTY)
RICE 48
PULSES 29
WHEAT 80

(ii)
ITEM QTY
RICE 25
WHEAT 28

(iii)
ORDNO ORDATE
1004 2023-12-25
1007 2024-04-30

(1 Mark for writing each correct output)

Note:
● Ignore output heading
● Ignore order of rows

28 (A) Write a user defined function in Python named showInLines() which reads contents 3
of a text file named [Link] and displays every sentence in a separate line.

Assume that a sentence ends with a full stop (.), a question mark (?), or an
exclamation mark (!).

Page 13/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
For example, if the content of file [Link] is as follows :
Our parents told us that we must eat vegetables to be
[Link] it turns out, our parents were right! So, what else
did our parents tell?

Then the function should display the file’s content as follows :

Our parents told us that we must eat vegetables to be healthy.


And it turns out, our parents were right!
So, what else did our parents tell?

Ans def showInLines():


with open("[Link]",'r') as F:
S=[Link]()
for W in S:
if W=="." or W=="?" or W=="!":
print(W)
elif W=="\n":
print(end="")
else:
print(W,end="")
[Link]()

OR

def showInLines():
F = open("[Link]",'r')
S=[Link]()
for W in S:
if [Link](".") or [Link]("?") or [Link]("!"):
print(W)
elif W=="\n":
print(end="")
else:
print(W,end="")
[Link]()

OR
Any other correct variation of the code

( ½ Mark for correctly opening the file)


( ½ Mark for reading the content of file using any correct method/mode)
( ½ Mark for the correct loop)
( ½ Mark for correctly checking end of sentence terminating characters)
( ½ Mark for correctly printing normal text without sentence terminator)
( ½ Mark for correctly printing text with sentence terminator)

OR

(B) Write a function, c_words() in Python that separately counts and displays the
number of uppercase and lowercase alphabets in a text file, [Link].

Page 14/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans def c_words():
f=open("[Link]","r")
Txt=[Link]()
CLower=CUpper=0
for i in Txt:
if [Link]():
CLower+=1
elif [Link]():
CUpper+=1
print(CLower, CUpper)
[Link]()
OR
def c_words():
with open("[Link]","r") as F:
Txt=[Link]()
CL=CU=0
for i in Txt:
if [Link](): # if i>="a" and i<="z":
CL+=1
elif [Link]():# if i>="A" and i<="Z":
CU+=1
print(CL, CU)

( ½ Mark for correctly opening the file)


( ½ Mark for reading the content of file using any correct method/mode)
( ½ Mark for the correct loop)
( ½ Mark for correctly checking and incrementing for uppercase alphabets)
( ½ Mark for correctly checking and incrementing for lowercase alphabets)
( ½ Mark for printing/returning required output)

29 Consider the table Projects given below: 1x3


=3
Table: Projects
P_id Pname Language Startdate Enddate
P001 School Management System Python 2023-01-12 2023-04-03
P002 Hotel Management System C++ 2022-12-01 2023-02-02
P003 Blood Bank Python 2023-02-11 2023-03-02
P004 Payroll Management System Python 2023-03-12 2023-06-02

Based on the given table, write SQL queries for the following:
(i) Add the constraint, primary key to column P_id in the existing table
Projects.
(ii) To change the language to Python of the project whose id is P002.
(iii) To delete the table Projects from MySQL database along with its data.

Ans (i) ALTER TABLE Projects


ADD PRIMARY KEY (P_id);

(½ Mark for ALTER TABLE part)


(½ Mark for ADD PRIMARY KEY part)

Page 15/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
(ii) UPDATE Projects
SET LANGUAGE= "Python"
WHERE P_id = "P002";

(½ Mark for UPDATE - SET part)


(½ Mark for WHERE part)

(iii) DROP TABLE Projects;

(1 Mark for correct command)


OR
(½ Mark for partial answer such as DROP Projects or DROP TABLE)

30 Consider a list named Nums which contains random integers. 3

Write the following user defined functions in Python and perform the specified
operations on a stack named BigNums.
(i) PushBig(): It checks every number from the list Nums and pushes all such
numbers which have 5 or more digits into the stack, BigNums.
(ii) PopBig(): It pops the numbers from the stack, BigNums and displays
them. The function should also display "Stack Empty" when there are
no more numbers left in the stack.

For example: If the list Nums contains the following data:


Nums = [213, 10025, 167, 254923, 14, 1297653, 31498, 386, 92765]
Then on execution of PushBig(), the stack BigNums should store:
[10025, 254923, 1297653, 31498, 92765]
And on execution of PopBig(), the following output should be displayed:
92765
31498
1297653
254923
10025
Stack Empty

Ans def PushBig(Nums,BigNums):


for N in Nums:
if len(str(N)) >= 5:
[Link](N)
def PopBig(BigNums):
while BigNums:
print([Link]())
else:
print("Stack Empty")

OR

Page 16/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
def PushBig():
for N in Nums:
if N >= 10000:
[Link](N)
def PopBig():
while BigNums:
print([Link]())
print("Stack Empty")

OR
Any other correct variation of the code

( ½ Mark for the correct loop in the function PushBig)


( ½ Mark for correctly checking the number of digits in the function PushBig)
( ½ Mark for pushing the correct number into BigNums in the function PushBig)

( ½ Mark for the correct loop in the function PopBig)


( ½ Mark for correctly checking the underflow condition and printing "Stack
Empty" in the function PopBig)
( ½ Mark for popping and printing the correct number in the function PopBig)

Note:
Ignore the declarations of Nums and/or BigNums

SECTION D
31 Consider the tables Admin and Transport given below: 1x4
Table: Admin =4
S_id S_name Address S_type
S001 Sandhya Rohini Day Boarder
S002 Vedanshi Rohtak Day Scholar
S003 Vibhu Raj Nagar NULL
S004 Atharva Rampur Day Boarder

Table: Transport
S_id Bus_no Stop_name
S002 TSS10 Sarai Kale Khan
S004 TSS12 Sainik Vihar
S005 TSSl0 Kamla Nagar

Write SQL queries for the following:

(i) Display the student name and their stop name from the tables Admin and
Transport.

Ans SELECT S_name, Stop_name FROM Admin, Transport


WHERE Admin.S_id = Transport.S_id;

(½ Mark for SELECT - FROM part)


(½ Mark for WHERE part)

Page 17/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
(ii) Display the number of students whose S_type is not known.

Ans SELECT COUNT(*) FROM Admin


WHERE S_type IS NULL;

(½ Mark for SELECT - FROM part)


(½ Mark for WHERE part)

(iii) Display all details of the students whose name starts with 'V' .

Ans SELECT * FROM Admin


WHERE S_name LIKE 'V%';

OR
Any other correct query using/without using join

(½ Mark for SELECT - FROM part)


(½ Mark for WHERE part)

(iv) Display student id and address in alphabetical order of student name, from the table
Admin.

Ans SELECT S_id, Address FROM Admin


ORDER BY S_name;

(½ Mark for SELECT - FROM part)


(½ Mark for ORDER BY part)

32 Sangeeta is a Python programmer working in a computer hardware company. She has 4


to maintain the records of the peripheral devices. She created a csv file named
[Link], to store the details.

The structure of [Link] is:


[P_id,P_name,Price]

where
P_id is Peripheral device ID (integer)
P_name is Peripheral device name (String)
Price is Peripheral device price (integer)

Sangeeta wants to write the following user defined functions :


Add_Device() : to accept a record from the user and add it to a csv file,
[Link]
Count_Device() : To count and display number of peripheral devices whose price
is less than 1000.

Page 18/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans import csv
def Add_Device():
F=open("[Link]","a",newline='')
W=[Link](F)
P_id=int(input("Enter the Peripheral ID"))
P_name=input("Enter Peripheral Name")
Price=int(input("Enter Price"))
L=[P_id,P_name,Price]
[Link](L)
[Link]()
def Count_Device():
F=open("[Link]","r")
L=list([Link](F))
Count=0
for D in L:
if int(D[2])<1000:
Count+=1
print(Count)
[Link]()

OR
Any other correct variation of the code

(½ Mark for opening the csv file correctly in the function Add_Device())
(½ Mark for reading the data from the user in the function Add_Device())
(½ Mark for writing the data correctly into the csv file in the function
Add_Device())
(½ Mark for opening the csv file correctly in the function Count_Device())
(½ Mark for reading the data from the file in the function Count_Device())
(½ Mark for loop in the function Count_Device())
(½ Mark for checking the condition and counting correctly in the function
Count_Device())
(½ Mark for printing the output correctly in the function Count_Device())

Note:
Full 4 mark should be awarded if the examinee has mentioned that there is no
mention of the task in the question

SECTION-E
33 Infotainment Ltd. is an event management company with its prime office located in 1x5
Bengaluru. The company is planning to open its new division at three different =5
locations in Chennai named as - Vajra, Trishula and Sudershana.
You, as a networking expert need to suggest solutions to the questions in part (i) to
(v), keeping in mind the distances and other given parameters.

Page 19/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4

Distances between various locations:


Vajra to Trishula 350 m
Trishula to Sudershana 415 m
Sudershana to Vajra 300 m
Bengaluru Office to Chennai 2000 km

Number of Computers installed at various locations :


Vajra 120
Sudershana 75
Trishula 65
Bengaluru Office 250

(i) Suggest and draw the cable layout to efficiently connect various locations in
Chennai division for connecting the digital devices.

Ans

(Full 1 Mark for drawing any valid layout with OR without mentioning topology)
OR
(Only ½ mark for mentioning only topology without cable layout)

Page 20/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
(ii) Which block in Chennai division should host the server? Justify your answer.

Ans Vajra can host the server as it has a maximum number of computers.
OR
Any other answer with valid justification

(½ Mark for the correct answer)


(½ Mark for the correct justification)

(iii) Which fast and effective wired transmission medium should be used to connect
the prime office at Bengaluru with the Chennai division?

Ans Optical Fiber

(1 Mark for the correct answer)

(iv) Which network device will be used to connect the digital devices within each
location of Chennai division so that they may communicate with each other ?

Ans Switch/Hub/Router

(1 Mark for the correct answer)

(v) A considerable amount of data loss is noticed between the different locations of the
Chennai division, which are connected in the network. Suggest a networking device
that should be installed to refresh the data and reduce the data loss during
transmission to and from different locations of Chennai division.

Ans Repeater
OR
Mentioning any other valid reason or solution for data loss

(1 Mark for the correct answer)

34 (A) (i) Differentiate between 'w' and 'a' file modes in Python. 2+3
=5

Ans 'w':
Open the file in write mode.
If the file doesn’t exist, then a new file will be created.
The file pointer is in the beginning of the file.
If the file exists, the contents of the file, if any, are lost/truncated and the new data
is added as fresh data into the file.

'a':
Open the file in append mode.
If the file doesn’t exist, then a new file will be created.
The file pointer is at the end of the file.
If the file exists, the new data is added at the end of the file without deleting the
previous contents of the file.

( 1 Mark each for any one correct characteristics of ‘w’ mode)

Page 21/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
( 1 Mark each for any one correct characteristics of ‘a’ mode)

(ii)
Consider a binary file, [Link], containing records stored in the given format :
{item_id: [item_name,amount]}

Write a function, Copy_new(), that copies all records whose amount is greater than
1000 from [Link] to new_items.dat.

Ans import pickle


def Copy_new():
F2=open("new_items.dat","wb")
try:
F1=open("[Link]","rb")
Data1=[Link](F1)
Data2={}
for K,V in [Link]():
if V[1]>1000:
Data2[K]=V
[Link](Data2,F2)
[Link]()
except:
print("File not found!")
[Link]()

OR

def Copy_new():
try:
F1=open("[Link]","rb")
F2=open("new_items.dat","wb")
D2={}
try:
while True:
D1=[Link](F1)
for k,v in [Link]():
if v[1]>1000:
D2[k]=v
except:
[Link](D2,F2)
[Link]()
[Link]()
except:
print('File Opening Error')
OR

def Copy_new():
f=open("[Link]","rb")
f1=open("new_items.dat","wb")
while True:
try:
r=[Link](f)
for k,v in [Link]():
if v[1]>1000:
[Link](r, f1)

Page 22/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
except:
break
[Link]()
[Link]()

OR
Any other correct variation of the code

(½ Mark for opening the file [Link] in correct mode)


(½ Mark for opening the file new_items.dat in correct mode)
(½ Mark for reading the content of the file [Link])
(½ Mark for the correct loop)
(½ Mark for checking the condition)
(½ Mark for writing the required contents into the file new_items.dat)

Note: Ignore [Link]() and [Link]()

OR

(B) (i) What is the advantage of using with clause while opening a data file in Python ?
Also give syntax of with clause.

The advantage of using with clause is that any file that is opened using this clause is
closed automatically, once the control comes outside the with clause.
Example:
with open("[Link]","r+") as file_object:
content = file_object.read()

In Python, we can open a file using with clause/statement.

The syntax of with clause is:


with open (file_name, access_mode) as file_object:

(1 Mark for writing any one advantage of with statement)


(1 Mark for writing syntax OR any valid example of with statement)

(ii)
A binary file, [Link] has the following structure :
[Emp_Id, Name, Salary]

where
Emp_Id : Employee id
Name : Employee Name
Salary : Employee Salary

Write a user defined function, disp_Detail(), that would read the contents of the
file [Link] and display the details of those employees whose salary is below
25000.

def disp_Detail():
try:
with open("[Link]","rb") as F:

Page 23/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Data=[Link](F)
for D in Data:
if D[2]<25000:
print(D)
except:
print("File Not Found!!!")

OR
def disp_Detail():
try:
with open("[Link]","rb") as F:
try:
while True:
Data=[Link](F)
if Data[2]<25000:
print(Data)
except:
print("File ended")
except:
print("File Not Found!!!")

OR
def disp_Detail():
try:
with open("[Link]","rb") as F:
try:
while True:
Data=[Link](F)
for D in Data:
if D[2]<25000:
print(D)
except:
print("File ended")
except:
print("File Not Found!!!")
OR
Any other correct variation of the code

(½ Mark for opening the file [Link] in correct mode)


(1 Mark for reading the content of the file [Link])
(½ Mark for the correct loop)
(½ Mark for checking the condition)
(½ Mark for printing the desired output)

35 (A) (i) Define Cartesian Product with respect to RDBMS. 1+4


=5

Ans Cartesian Product operation combines rows/tuples from two tables/relations.


It results in all the pairs of rows from both the tables. It is denoted by 'X'.

( 1 Mark each for the correct definition)


Page 24/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
(ii) Sunil wants to write a program in Python to update the quantity to 20 of the
records whose item code is 111 in the table named shop in MySQL database named
Keeper.
The table shop in MySQL contains the following attributes :
● Item_code: Item code (Integer)
● Item_narne: Name of item (String)
● Qty: Quantity of item (Integer)
● Price: Price of item (Integer)
Consider the following to establish connectivity between Python and MySQL:
Username: admin
Password : Shopping
Host: localhost

Ans import pymysql as pm


DB=[Link](host="localhost",user="admin",\
passwd="Shopping", database="Keeper")
MyCursor=[Link]()
SQL=f"UPDATE SHOP SET QTY=%S WHERE ITEM_CODE=%S"%(20,111)
# OR
SQL="UPDATE SHOP SET QTY=20 WHERE ITEM_CODE=111"
[Link](SQL)
[Link]()

(½ mark for importing with any correct module/method)


(1 mark for correct connect())
( ½ mark for creating the cursor)
( 1 mark for the correct SQL command - ½ Mark for UPDATE SET and ½
Mark for WHERE)
(1 mark for correctly executing SQL)

OR

(B) (i) Give any two features of SQL.

Any two of the following


● Full form is Structured Query Language.
● Is used to retrieve and view specific data from a table in a database.
● Is case insensitive
● Each query in SQL ends with a semicolon (;)
● It contains DDL and DML

Ans ( ½ Mark each for the any two correct feature as mentioned above or any
other correct feature)

(ii) Sumit wants to write a code in Python to display all the details of the passengers
from the table flight in MySQL database, Travel. The table contains the
following attributes:
F_ code : Flight code (String)
Page 25/26
CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
F_name: Name of flight (String)
Source: Departure city of flight (String)
Destination: Destination city of flight (String)
Consider the following to establish connectivity between Python and MySQL:
● Username : root
● Password : airplane
● Host : localhost

Ans import pymysql as pm

DB=[Link](host="localhost",user="root",\
password="airplane",database="Travel")
MyCursor=[Link]()
[Link]("SELECT * FROM Flight ")
Rec=[Link]()
for R in Rec:
print (R)

OR
Any other correct variation of the code

( ½ mark for importing any correct module/method pymysql or any other)


( 1 mark for correct connect())
( 1 mark for correctly executing the query)
( ½ mark for correctly fetching the data)
( 1 mark for correctly displaying data)

Note:
Full 4 mark should be awarded if the examinee has mentioned that there is no
mention of the task in the question

Page 26/26
Marking Scheme​
Strictly Confidential
(For internal and restricted use only)
Senior Secondary School Examination 2025
SUBJECT NAME: COMPUTER SCIENCE SUBJECT CODE: 083 (Set 4 Q.P. CODE 91)

General Instructions:
1 You are aware that evaluation is the most important process in the actual and correct
assessment of the candidates. A small mistake in evaluation may lead to serious problems
which may affect the future of the candidates, education system and teaching profession.
To avoid mistakes, it is requested that before starting evaluation, you must read and
understand the spot evaluation guidelines carefully.

2 “Evaluation policy is a confidential policy as it is related to the confidentiality of the


examinations conducted, Evaluation done and several other aspects. Its’ leakage to the
public in any manner could lead to derailment of the examination system and affect the
life and future of millions of candidates. Sharing this policy/document to anyone,
publishing in any magazine and printing in News Paper/Website etc. may invite action
under various rules of the Board and IPC.”

3 Evaluation is to be done as per instructions provided in the Marking Scheme. It should not
be done according to one’s own interpretation or any other consideration. Marking Scheme
should be strictly adhered to and religiously followed. However, while evaluating answers
which are based on latest information or knowledge and/or are innovative, they may be
assessed for their correctness otherwise and due marks be awarded to them. In class-X,
while evaluating two competency-based questions, please try to understand the given
answer and even if the reply is not from the marking scheme but correct competency is
enumerated by the candidate, due marks should be awarded.

4 The Marking Scheme carries only suggested value points for the answers.
These are in the nature of Guidelines only and do not constitute the complete answer. The
students can have their own expression and if the expression is correct, the due marks
should be awarded accordingly.

5 The Head-Examiner must go through the first five answer books evaluated by each
evaluator on the first day, to ensure that evaluation has been carried out as per the
instructions given in the Marking Scheme. If there is any variation, the same should be
zero after deliberation and discussion. The remaining answer books meant for evaluation
shall be given only after ensuring that there is no significant variation in the marking of
individual evaluators.

6 Evaluators will mark( √ ) wherever the answer is correct. For wrong answer CROSS ‘X” be
marked. Evaluators will not put right (✓)while evaluating which gives an impression that
the answer is correct and no marks are awarded. This is the most common mistake which
evaluators are committing.

7 If a question has parts, please award marks on the right-hand side for each part. Marks
awarded for different parts of the question should then be totaled up and written in the
left-hand margin and encircled. This may be followed strictly.

8 If a question does not have any parts, marks must be awarded in the left-hand margin and
encircled. This may also be followed strictly.

9 If a student has attempted an extra question, the answer of the question deserving more
marks should be retained and the other answer scored out with a note “Extra Question”.

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 1/27 ]
10 No marks to be deducted for the cumulative effect of an error. It should be penalized only
once.

11 A full scale of marks 70 marks has to be used. Please do not hesitate to award full marks
if the answer deserves it.

12 Every examiner has to necessarily do evaluation work for full working hours i.e., 8 hours
every day and evaluate 20 answer books per day in main subjects and 25 answer books per
day in other subjects (Details are given in Spot Guidelines).This is in view of the reduced
syllabus and number of questions in question paper.

13 Ensure that you do not make the following common types of errors committed by the
Examiner in the past:-
●​ Leaving the answer or part thereof unassessed in an answer book.
●​ Giving more marks for an answer than assigned to it.
●​ Wrong totaling of marks awarded on an answer.
●​ Wrong transfer of marks from the inside pages of the answer book to the title page.
●​ Wrong question wise totaling on the title page.
●​ Wrong totaling of marks of the two columns on the title page.
●​ Wrong grand total.
●​ Marks in words and figures not tallying/not same.
●​ Wrong transfer of marks from the answer book to online award list.
●​ Answers marked as correct, but marks not awarded. (Ensure that the right tick mark is
correctly and clearly indicated. It should merely be a line. Same is with the X for
incorrect answers.)
●​ Half or a part of the answer marked correct and the rest as wrong, but no marks
awarded.

14 While evaluating the answer books, if the answer is found to be totally incorrect, it should
be marked as cross (X) and awarded zero (0)Marks.

15 Any unassessed portion, non-carrying over of marks to the title page, or totaling error
detected by the candidate shall damage the prestige of all the personnel engaged in the
evaluation work as also of the Board. Hence, in order to uphold the prestige of all
concerned, it is again reiterated that the instructions be followed meticulously and
judiciously.

16 The Examiners should acquaint themselves with the guidelines given in the “Guidelines for
Spot Evaluation” before starting the actual evaluation.

17 Every Examiner shall also ensure that all the answers are evaluated, marks carried over to
the title page, correctly totaled and written in figures and words.

18 The candidates are entitled to obtain a photocopy of the Answer Book on request on
payment of the prescribed processing fee. All Examiners/Additional Head Examiners/Head
Examiners are once again reminded that they must ensure that evaluation is carried out
strictly as per value points for each answer as given in the Marking Scheme.

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 2/27 ]
MARKING SCHEME
COMPUTER SCIENCE 083
Max. Marks: 70
General Instructions :
(i) This question paper contains 37 questions.
(ii) All questions are compulsory. However, internal choices have been provided in some
questions. Attempt only one of the choices in such questions.
(iii) The paper is divided into 5 Sections - A, B, C, D, E.
(iv) Section A, consists of 21 questions (1 to 21). Each question carries 1 mark.
(v) Section B, consists of 7 questions (22 to 28). Each question carries 2 marks.
(vi) Section C, consists of 3 questions (29 to 31). Each question carries 3 marks.
(vii) Section D, consists of 4 questions (32 to 35). Each question carries 4 marks.

(viii) Section E, consists of 2 questions (36 & 37). Each question carries 5 marks.

(ix) All programming questions are to be answered using Python Language only.
(x) In case of MCQs, text of the correct answer should also be written
Specific Instructions:
●​ The answers given in the marking scheme are SUGGESTIVE. Examiners are requested to
award marks for all alternative correct Solutions/Answers conveying a similar meaning
●​ All programming questions have to be answered with respect to Python only
●​ In Python, ignore case sensitivity for identifiers (Variable / Functions / Structures / Class
Names)
●​ In Python indentation is mandatory, however, the number of spaces used for indenting may
vary
●​ In SQL related questions – both ways of text/character entries should be acceptable for
Example: “AMAR” and ‘amar’ both are acceptable.
●​ In SQL related questions – all date entries should be acceptable for Example: ‘YYYY-MM-DD’,
‘YY-MM-DD’, ‘DD-Mon-YY’, “DD/MM/YY”, ‘DD/MM/YY’, “MM/DD/YY”, ‘MM/DD/YY’ and
{MM/DD/YY} are correct.
●​ In SQL related questions – semicolon should be ignored for terminating the SQL statements
●​ In SQL related questions – ignore case sensitivity
●​ In SQL output questions – ignore the column headers
●​ In SQL output questions – ignore the order of rows until ORDER BY is specified

SECTION A (21x1=21)
1. State True or False: 1
“A Python List must always contain all its elements of same data type.”
Ans False
(1 Mark for writing the correct answer)

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 3/27 ]
2. What will be the output of the following statement? 1
print(14%3**2*4)
(A) 16 (B) 64
(C) 20 (D) 256

Ans (C) 20
(1 Mark for writing the correct option)
3. Identify the correct output of the following code snippet: 1
game="Olympic2024"
print([Link]("C"))
(A) 0 (B) 6
(C) -1 (D) ValueError
Ans (D) ValueError
(1 Mark for writing the correct option)
4. Which of the following is the correct identifier? 1
(A) global (B) Break
(C) def (D) with

Ans (B) Break


(1 Mark for writing the correct option)
5. Identify the invalid Python statement out of the following options: 1
(A) print("A",10,end="*") (B) print("A",sep="*",10)
(C) print("A",10,sep="*") (D) print("A"*10)

Ans (B) print("A",sep="*",10)


(1 Mark for writing the correct option)
6. Consider the statements given below and then choose the correct output from 1
the given options:
L=['TIC', 'TAC']
print(L[::-1])

(A) ['CIT', 'CAT'] (B) ['TIC', 'TAC']


(C) ['CAT', 'CIT'] (D) ['TAC', 'TIC']

Ans (D) ['TAC', 'TIC']


(1 Mark for writing the correct option)
7. Which of the following operator evaluates to True if the variable on either side 1
of the operator points towards the same memory location and False otherwise?

(A) is (B) is not


(C) and (D) or

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 4/27 ]
Ans (A) is
(1 Mark for writing the correct option)
8. Consider the statements given below and then choose the correct output from 1
the given options:
D={'S01':95, 'S02':96 }
for I in D:
print(I,end='#')

(A) S01#S02# (B) 95#96#


(C) S01,95#S02,96# (D) S01#95#S02#96#

Ans (A) S01#S02#


(1 Mark for writing the correct option)
9. While creating a table, which constraint does not allow insertion of duplicate 1
values in the table ?
(A) UNIQUE (B) DISTINCT

(C) NOT NULL (D) HAVING

Ans (A)​UNIQUE
(1 Mark for writing the correct option)
10. Consider the statements given below and then choose the correct output from 1
the given options:
def Change(N):
N=N+10
print(N,end='$$')
N=15
Change(N)
print(N)

(A) 25$$15 (B) 15$$25

(C) 25$$25 (D 2525$$


)

Ans (A) 25$$15


(1 Mark for writing the correct option)

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 5/27 ]
11. Consider the statements given below and then choose the correct output from 1
the given options:
N='5'
try:
print('WORD' + N, end='#')
except:
print('ERROR',end='#')
finally:
print('OVER')
(A) ERROR# (B) WORD5#OVER

(C) WORD5# (D) ERROR#OVER

Ans (B) WORD5#OVER


(1 Mark for writing the correct option)
12. Which of the following built-in function/method returns a dictionary ? 1

(A) dict() (B) keys()

(C) values() (D) items()

Ans (A) dict()


(1 Mark for writing the correct option)
13. Which of the following is a DML command in SQL ? 1

(A) UPDATE (B) CREATE

(C) ALTER (D) DROP

Ans (A) UPDATE


(1 Mark for writing the correct option)
14. Which aggregate function in SQL displays the number of values in the specified 1
column ignoring the NULL values ?
(A) len() (B) count()

(C) number() (D) num()

Ans (B) count()


(1 Mark for writing the correct option)
15. In MYSQL, which type of value should not be enclosed within quotation marks ? 1

(A) DATE (B) VARCHAR

(C) FLOAT (D) CHAR

Ans (C) FLOAT


(1 Mark for writing the correct option)

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 6/27 ]
16. State True or False : 1
If table A has 6 rows and 3 columns, and table B has 5 rows and 2 columns, the
Cartesian product of A and B will have 30 rows and 5 columns.
Ans True
(1 Mark for writing the correct answer)
17. Which of the following networking devices is used to regenerate and transmit 1
the weakened signal ahead?
(A) Hub (B) Ethernet Card

(C) Repeater (D) Modem

Ans (C) Repeater


(1 Mark for writing the correct option)
18. Which of the following options is the correct protocol used for phone calls over 1
the Internet?
(A) PPP (B) FTP

(C) HTTP (D) VoIP

Ans (D) VoIP


(1 Mark for writing the correct option)
19. Expand ARPANET. 1

Ans Advanced Research Projects Agency Network


(Full 1 Mark for writing the the correct full form)
OR
(½ Mark for writing any two correct expanded terms)

[Link]. 20 and 21 are Assertion (A) and Reason (R) based questions. Mark the
correct choice as
(A)​Both Assertion (A) and Reason (R) are true and Reason (R) is the
correct explanation for Assertion (A).
(B)​Both Assertion (A) and Reason (R) are true and Reason (R) is not the
correct explanation for Assertion (A).
(C)​Assertion (A) is true but, Reason (R) is false.
(D)​Assertion (A) is false but, Reason (R) is true.
20. Assertion (A): For a binary file opened using 'rb' mode, the [Link]() 1
method will display an error.

Reason (R): The [Link]() method is used to read from a binary file.
Ans (C) ​ Assertion (A) is true, but Reason (R) is false.
(1 Mark for writing the correct option)
21. Assertion (A) : We can retrieve records from more than one table in MYSQL. 1
Reason (R) : Foreign key is used to establish a relationship between two tables.

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 7/27 ]
Ans (B)​Both Assertion (A) and Reason (R) are true and Reason (R) is not the correct
explanation for Assertion (A).
(1 Mark for writing the correct option)

SECTION B (7x2=14)
22. What does the return statement do in a function ? Explain with the help of 2
an example.
Ans The return statement in Python is used to exit a function and return a value to the caller.
Example :
def Add(A, B):
return A+B
Result=Add(5,3)
print(Result)

Output:
8
(1 Mark for writing the correct explanation)
(1 Mark for writing the correct example)
OR
( Full 2 Marks for correct explanation with the help of a suitable example)
23. Write one example of each of the following in Python : 2
(i) Syntax Error
(ii) Implicit Type conversion
Ans (i) Syntax Error
print(2 ; 5)

(ii) Implicit Type conversion


x=10
y=20.5
print(x+y)
Note:
●​ The above examples are just suggestive. Accept all correct examples
(1 Mark for writing each correct example)
24. Consider the following dictionaries, D and D1 :​ ​ 2
D={"Suman": 40, "Raj":55, "Raman":60}
D1={"Aditi":30, "Amit":90,"Raj":20}
(Answer using built-in Python functions only)
(i)​ (a)​ Write a statement to display/return the value corresponding to the
key "Raj" in the dictionary D.
​ ​ ​ ​ ​ OR
​ (b)​ Write a statement to display the length of the dictionary D1.
(ii)​ (a)​ Write a statement to append all the key-value pairs of the
dictionary D to the dictionary D1.

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 8/27 ]
​ ​ ​ ​ ​ OR
​ (b)​ Write a statement to delete the item with the given key "Amit"
from the dictionary D1.
Ans
(i)​ (a)​ [Link]("Raj") # OR D["Raj"] may also be considered
​ ​ ​ ​ OR
​ (b)​ len(D1) # OR len([Link]())
# OR len([Link]())
# OR len([Link]())
(ii)​ (a)​ [Link](D)
​ ​ ​ ​ OR
​ (b)​ [Link]("Amit") # OR del D1["Amit"]
# may also be considered
(i) (1 Mark for writing the correct statement)
(ii) (1 Mark for writing the correct statement)
25. What possible output from the given options is expected to be displayed when 2
the following code is executed?
import random
Cards=["Heart","Spade","Club","Diamond"]
for i in range(2):
print(Cards[[Link](1,i+2)],end="#")
(A) Spade#Diamond# (B) Spade#Heart#
(C) Diamond#Club# (D) Heart#Spade#

Ans (A)​Spade#Diamond#
(2 Marks for writing the correct option)
26. The code given below accepts N as an integer argument and returns the sum of 2
all integers from 1 to N. Observe the following code carefully and rewrite it after
removing all syntax and logical errors. Underline all the corrections made.
def Sum(N)
for I in range(N):
S=S+I
return S
print(Sum(10)
Ans def Sum(N):
S=N
for I in range(N):
S=S+I
return S
print(Sum(10))
OR

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 9/27 ]
def Sum(N):
S=0
for I in range(1,N+1): # OR for I in range(N+1):
S=S+I
return S
print(Sum(10))
(Full 2 Marks for writing all required corrections)

OR
(½ Mark for writing the : after def Sum(N) )
(½ Mark for correctly initialising S)
(½ Mark for calculating the correct/required sum S)
(½ Mark for writing the ‘)’ at the end of print(Sum(10) )

OR
(1 Mark for only identification of all/any three errors without correction)
27. Nisha is assigned the task of maintaining the staff data of an organization. She 2
has to store the details of the staff in the SQL table named EMPLOYEES with
attributes as EMPNO, NAME, DEPARTMENT, BASICSAL to store Employee’s
Identification Number, Name, Department and Basic Salary respectively. There
can be two or more Employees with the same name in the organization.
(i)
(a)​Help Nisha to identify the attribute which should be designated as the
PRIMARY KEY. Justify your anwer.
OR

(b)​Help Nisha to identify the constraint which should be applied to the


attribute NAME such that the Employees’ Names cannot be left empty or
NULL while entering the records but can have duplicate values.
Ans (i)
(a)​EMPNO
(i) Employee’s Identification Number always contains unique and not
null values.
(ii) Other attributes may have duplicate values (assuming 2 or more
employees may have same Name, Department or Basic Salary) and
an attribute with possible duplicate values can not be considered
as the Primary Key.
(Any one valid justification)

OR
(b)​NOT NULL
(i) (a)
(½ Mark for suggesting the correct attribute for PRIMARY KEY)
(½ Mark for any one valid justification)

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 10/27 ]
OR
(i) (b)
(1 Mark for writing the correct constraint for attribute NAME)
(ii)
(a)​Write the SQL command to change the size of the attribute BASICSAL in
the table EMPLOYEES to allow the maximum value of 99999.99 to be
stored in it.
OR
(b)​Write the SQL command to delete the table EMPLOYEES
Ans (ii)
(a)​ALTER TABLE EMPLOYEES ​
MODIFY COLUMN BASICSAL FLOAT(7,2); ​
# OR DECIMAL(7,2)
OR
(b)​DROP TABLE EMPLOYEES;
(a)​(½ Mark for writing ALTER TABLE EMPLOYEES)
(½ Mark for correctly writing remaining part of the command)
OR
(b)​(1 Mark for writing DROP TABLE EMPLOYEES correctly)
OR
(½ Mark for writing DROP TABLE only)
28. (a)​Expand and explain the term URL. 2
OR
(b)​Expand the term PPP. What is the use of PPP?
Ans (a)​URL (Uniform Resource Locator) : It is the unique address of any resource
on the Internet.​
OR
(b)​PPP (Point to Point Protocol) : This protocol is used to establish a dedicated
and direct connection between two communicating devices.
(a)​(1 Mark for writing correct explanation)​
(1 Mark for writing correct expansion)
OR
(½ Mark for writing any two words of correct expansion)
OR
(b)​(1 Mark for writing correct expansion)
(1 Mark for writing correct use)
OR
(½ Mark for writing any two words of correct expansion)

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 11/27 ]
SECTION C (3x3=9)
29. (a)​Write a Python function that displays all the lines containing the word 3
'vote' from a text file "[Link]". For example, if the file
contains :
In an election many people vote to choose their representative.
The candidate getting the maximum share of votes stands elected.
Normally, one person has to vote once.
The process of voting may vary with time and region.

Then the output should be :


In an election many people vote to choose their
representative.
Normally, one person has to vote once.
Ans def PrintVote():
F=open("[Link]")​
Lines=[Link]()
for Line in Lines:
L=[Link]()
if "vote" in L:
print(Line)​
[Link]()
OR
def PrintVote():
with open("[Link]") as F:​
Lines=[Link]()
for Line in Lines:
L=[Link]()
if "vote" in L:
print(Line)
OR
def PrintVote():
F=open("[Link]")
while True:
Line=[Link]()
if Line!="":
if "vote" in [Link]():
print(Line)
else:
break
[Link]()
OR
Any other equivalent correct code
(½ Mark for opening the file in default/correct mode)
(½ Mark for correct reading & iteration)
(½ Mark for correct logic of extracting the word 'vote')
(1 Mark for correct condition)
(½ Mark for displaying line)
OR

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 12/27 ]
(b)​Write a Python function that displays all the words starting and ending with
a vowel from a text file "[Link]". The consecutive words should be
separated by a space in the output. For example, if the file contains :

Once there was a wise man in a village.


He was an awesome story-teller.
He was able to keep people anchored while listening to him.

Then the output should be :


Once a a awesome able
Ans def vowels():
F=open('[Link]')
Data=[Link]()
Words=[Link]()
for Word in Words:
if Word[0] in 'aeiouAEIOU':
if Word[–1] in 'aeiouAEIOU':
print(Word,end=' ')
[Link]()
OR
def vowels():
with open('[Link]') as F:
Data=[Link]()
Words=[Link]()
for Word in Words:
if Word[0].upper() in 'AEIOU'
and Word[–1].upper() in 'AEIOU':
print(Word,end=' ')
OR
Any other equivalent correct code
(½ Mark for opening the file in default/correct mode)
(½ Mark for correct reading & iteration)
(½ Mark for correct logic to process each word)
(1 Mark for correct condition)
(½ Mark for displaying word)
30. (a)​A stack, named ClrStack, contains records of some colors. Each record is 3x1
represented as a tuple containing four elements – ColorName, RED, =3
GREEN, BLUE. ColorName is a string, and RED, GREEN, BLUE are
integers. For example, a record in the stack may be ('Yellow', 237,
250, 68)​ ​
Write the following user-defined functions in Python to perform the
specified operations on ClrStack:
(i) push_Clr(ClrStack, new_Clr): This function takes the stack
ClrStack and a new record new_Clr as arguments and pushes this
new record onto the stack.

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 13/27 ]
(ii) pop_Clr(ClrStack): This function pops the topmost record
from the stack and returns it. If the stack is already empty, the
function should display the message "Underflow".
(iii) isEmpty(ClrStack): This function checks whether the stack is
empty. If the stack is empty, the function should return True,
otherwise the function should return False.

Ans
(i) def push_Clr(ClrStack, new_Clr):
[Link](new_Clr)

(ii) def pop_Clr(ClrStack):


if len(ClrStack) == 0:
# OR if not ClrStack:
# OR if ClrStack == []:
print("Underflow")
else:
return([Link]())

(iii) def isEmpty(ClrStack):


if len(ClrStack) == 0:
# OR if not ClrStack:
# OR if ClrStack == []:
return True
else:
return False

(i)
(1 Mark for correct definition of push_Clr(ClrStack, new_Clr))

(ii)
(½ Mark for correctly checking and displaying “Underflow”)
(½ Mark for correctly popping and returning popped tuple/data)

(iii)
(½ Mark for correctly checking whether the Stack is Empty or not)
(½ Mark for correctly returning/printing the required values)
OR
(b)​Write the following user-defined functions in Python :
(i) push_trail(N,myStack): Here N and myStack are lists, and
myStack represents a stack. The function should push the last 5
elements from the list N onto the stack myStack. For example, if
the list N is [1,2,3,4,5,6,7], then the function
push_trail() should push the elements 3,4,5,6,7 onto the
stack. Therefore the value of stack will be [3,4,5,6,7].

Assume that N contains at least 5 elements.

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 14/27 ]
(ii) pop_one(myStack): The function should pop an element from
the stack myStack, and return this element. If the stack is empty,
then the function should display the message 'Stack
Underflow', and return None.

(iii) display_all(myStack): The function should display all the


elements of the stack myStack, without deleting them. If the
stack is empty, the function should display the message 'Empty
Stack'.

Ans (b)
(i) def push_trail(N,myStack):
for i in range(-5,0,1): # Any other correct loop
[Link](N[i])

(ii) def pop_one(myStack):


if not myStack: #OR if myStack==[]:
#OR if len(myStack)==0:
print('Stack Underflow')
else:
return [Link]()

(iii) def display_all(myStack):


if not myStack: #OR if myStack==[]:
#OR if len(myStack)==0:
print("Empty Stack")
else:
for i in myStack[::–1]: # print(myStack[::-1])
print(i,end=' ') # -

(i)
(1 Mark for correct definition of push_trail(N,myStack))
(ii)
(½ Mark for correctly checking and displaying “Stack Underflow”)
(½ Mark for correctly popping and returning last element)
(iii)
(½ Mark correctly checking Empty condition)
(½ Mark correctly displaying content till the last value in the stack)
31. (a)​ Predict the output of the following code : 3
def ExamOn(mystr) :
​ newstr = ""
​ count = 0
​ for i in mystr:
​ if count%2 != 0:
​ ​ newstr = newstr + str(count–1)
else:
newstr = newstr + [Link]()
count += 1

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 15/27 ]
newstr = newstr + mystr[:2]
print("The new string is:", newstr)
ExamOn("GenX")
Ans The new string is: g0n2Ge
(½ Mark for each correct letter/digit in the right order)

Note:
(2½ Marks only to be awarded, if all the parts of g0n2Ge is written
correctly without the text ‘The new string is:’)
OR
(b) Write the output on execution of the following Python code:
def Change(X):
for K,V in [Link]():
[Link](K)
[Link](V)
D={1:"ONE",2:"TWO",3:"THREE"}
L1=[]
L2=[]
Change(D)
print(L1)
print(L2)
print(D)

Ans Note: Considering two lines after the for loop indented
[1, 2, 3]
['ONE', 'TWO', 'THREE']
{1: 'ONE', 2: 'TWO', 3: 'THREE'}

OR
Note: Considering only first line after the for loop to be indented
[1, 2, 3]
['THREE']
{1: 'ONE', 2: 'TWO', 3: 'THREE'}

(1 Mark for writing each correct line of output)


OR
(Full 3 Marks for writing indentation error)

SECTION D (4x4=16)
32. Suman has created a table named WORKER with a set of records to maintain 4
the data of the construction sites, which consists of WID, WNAME, WAGE,
HOURS, TYPE, and SITEID. After creating the table, she entered data in it,
which is as follows :

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 16/27 ]
WID WNAME WAGE HOURS TYPE SITEID
W01 Ahmed J 1500 200 Unskilled 103
W11 Naveen S 520 100 Skilled 101
W02 Jacob B 780 95 Unskilled 101
W15 Nihal K 560 110 Semiskilled NULL
W10 Anju S 1200 130 Skilled 103

(a) Based on the data given above, answer the following questions :

(i) Write the SQL statement to display the names and wages of those workers
whose wages are between 800 and 1500.
Ans SELECT WNAME, WAGE FROM WORKER
WHERE WAGE BETWEEN 800 AND 1500;
OR
SELECT WNAME, WAGE FROM WORKER
WHERE WAGE>=800 AND WAGE<=1500;

(½ Mark for correctly writing SELECT WNAME, WAGE FROM WORKER)


(½ Mark for correctly writing WHERE WAGE BETWEEN 800 AND 1500)

(ii) Write the SQL statement to display the record of workers whose SITEID is
not known.
Ans SELECT * FROM WORKER
WHERE SITEID IS NULL;

(½ Mark for correctly writing SELECT * FROM WORKER or Equivalent)


(½ Mark for correctly writing WHERE SITEID IS NULL)

(iii) Write the SQL statement to display WNAME, WAGE and HOURS of all those
workers whose TYPE is 'Skilled'.
Ans SELECT WNAME, WAGE, HOURS FROM WORKER
WHERE TYPE="Skilled";

(½ Mark for writing SELECT WNAME, WAGE, HOURS FROM WORKER)


(½ Mark for writing WHERE TYPE = "Skilled")

(iv) Write the SQL statement to change the WAGE to 1200 of the workers where
the TYPE is "Semiskilled"
Ans UPDATE WORKER SET WAGE=1200
WHERE TYPE="Semiskilled";

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 17/27 ]
(½ Mark for writing UPDATE WORKER SET WAGE=1200)
(½ Mark for writing WHERE TYPE = "Semiskilled")

OR
(b) Considering the above given table WORKER, write the output on
execution of the following SQL commands:
(i) SELECT WNAME, WAGE*HOURS FROM WORKER ​
WHERE SITEID = 103;
Ans
WNAME WAGE*HOURS
Ahmed J 300000
Anju S 156000

(1 Mark for writing correct output)


(ii) SELECT COUNT(DISTINCT TYPE) FROM WORKER ;
Ans
COUNT(DISTINCT TYPE)
3

(1 Mark for writing correct output)


(iii) SELECT MAX(WAGE), MIN(WAGE), TYPE FROM WORKER ​
GROUP BY TYPE;
Ans
MAX(WAGE) MIN(WAGE) TYPE
1500 780 Unskilled
1200 520 Skilled
560 560 Semiskilled

(1 Mark for writing correct output)


(iv) SELECT WNAME, SITEID FROM WORKER WHERE TYPE="Unskilled"​
ORDER BY HOURS;
Ans
WNAME SITEID
Jacob B 101
Ahmed J 103

(1 Mark for writing correct output)


33. A csv file "P_record.csv" contains the records of patients in a hospital. Each 4
record of the file contains the following data :
●​ Name of a patient
●​ Disease
●​ Number of days patient is admitted
●​ Amount

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 18/27 ]
For example, a sample record of the file may be :
​ ["Gunjan","Jaundice",4,15000]
​ Write the following Python functions to perform the specified operations on
this file :

(i) Write a function read_data() which reads all the data from
the file and displays the details of all the 'Cancer' patients.

(ii) Write a function count_rec() which counts and returns the


number of records in the file.
Ans (i)
import csv
def read_data():
F=open("P_record.csv","r")
Records=list([Link](F))
for R in Records :
if R[1]=="Cancer":
print(R)
[Link]()
(ii)
def count_rec():
with open("P_record.csv","r") as F:
Records=list([Link](F))
print(len(Records))

(i)
(½ Mark for opening the csv file in correct mode)
(½ Mark for reading the records from csv file)
(½ Mark for iteration of records)
(½ Mark for checking and displaying the matched records correctly)

(ii)
(½ Mark for opening the csv file in correct mode)
(½ Mark for reading the records from csv file)
(1 Mark for finding/counting & displaying the number of records)

34. Assume that you are working in the IT Department of a Creative Art Gallery 4x1
(CAG), which sells different forms of art creations like Paintings, Sculptures etc. =4
The data of Art Creations and Artists are kept in tables Articles and Artists
respectively. Following are few records from these two tables :
Table : Articles
Code A_Code Article DOC Price
PL001 A0001 Painting 2018-10-19 20000
SC028 A0004 Sculpture 2021-01-15 16000
QL005 A0003 Quilling 2024-04-24 3000

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 19/27 ]
Table : Artists
A_Code Name Phone Email DOB
A0001 Roy 595923 r@[Link] 1986-10-12
A0002 Ghosh 1122334 ghosh@[Link] 1972-02-05
A0003 Gargi 121212 Gargi@[Link] 1996-03-22
A0004 Mustafa 33333333 Mf@[Link] 2000-01-01

Note :​
●​ The tables contain many more records than shown here.
●​ DOC is Date of Creation of an Article.

As an employee of CAG, you are required to write the SQL queries for the
following :
(i)​ To display all the records from the Articles table in descending
order of price.
(ii)​ To display the details of Articles which were created in the year
2020.
(iii)​ To display the structure of Artists table.
(iv)​ (a)​ To display the name of all Artists whose Article is
Painting through Equi Join.
​ ​ ​ ​ ​ OR
(b)​ To display the name of all Artists whose Article is 'Painting'
through Natural Join.
Ans (i) SELECT * FROM Articles
ORDER BY PRICE DESC;
(½ Mark for SELECT * FROM Articles or similar)
(½ Mark for ORDER BY PRICE DESC)
(ii) SELECT * FROM Articles
WHERE DOC LIKE '2020%';
OR
SELECT * FROM Articles
WHERE DOC>='2020-01-01' AND DOC<='2020-12-31';
OR
SELECT * FROM Articles
WHERE DOC BETWEEN '2020-01-01' AND '2020-12-31';
(½ Mark for SELECT * FROM Articles or similar)
(½ Mark for WHERE DOC LIKE '2020%' OR any other correct equivalent)
(iii) DESC Artists;

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 20/27 ]
(½ Mark for DESC)
(½ Mark for mentioning Artists after DESC)

(iv)
(a)​SELECT Name FROM Articles A1, Artists A2
WHERE A1.A_code = A2.A_code AND Article='Painting';
OR
Any other equivalent SQL statement
(½ Mark for SELECT Name FROM Articles A1, Artists A2 or similar)
(½ Mark for WHERE A1.A_code = A2.A_code AND Article='Painting';)
OR
(b)​SELECT Name FROM Articles NATURAL JOIN Artists
WHERE Article = 'Painting';
OR
Any other equivalent SQL statement
(½ Mark for selecting from both the tables)
(½ Mark for correctly using condition/correctly using join option)
35. 4
A table, named THEATRE, in CINEMA database, has the following structure :
Fields Type
Th_ID char(5)
Name varchar(15)
City varchar(15)
Location varchar(15)
Seats int

Write a function Delete_Theatre(), to input the value of Th_ID from the user and
permanently delete the corresponding record from the table.

Assume the following for Python-Database connectivity :


Host : localhost, User : root, Password : Ex2025
Ans import pymysql as pm # OR import [Link] as pm
def Delete_Theatre():
Mydb=[Link](host = 'localhost',
user = 'root', password = 'Ex2025', database = 'CINEMA')
MyCursor = [Link]()
TID = input("Theatre ID:")
Query = "DELETE FROM Theatre WHERE Th_ID='{}'".format(TID)
# Query = f"DELETE FROM Theatre WHERE Th_ID='{TID}'"
# Query = "DELETE FROM Theatre WHERE Th_ID='%s'"%(TID,)
# Query = "DELETE FROM Theatre WHERE Th_ID='"+TID+"'"
[Link](Query)
[Link]()
[Link]()

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 21/27 ]
OR
import pymysql as pm # OR import [Link] as pm
def Delete_Theatre():
Mydb=[Link](host = 'localhost',
user = 'root', password = 'Ex2025', database = 'CINEMA')
MyCursor = [Link]()
TID = input("Theatre ID:")
Query = "DELETE FROM Theatre WHERE Th_ID=%s"
Data=(TID,)
[Link](Query, Data)
[Link]()
[Link]()

OR
any equivalent valid code
(1 Mark for creating correct connectivity)
(1 Mark for creating the cursor)
(1 Mark for correct formation of Query)
(½ Mark for correct execution of the query)
(½ Mark for correctly using commit() )

Note:
(½ Mark for importing correct module, if the marks allocated are less than 4)

SECTION E (2x5=10)
36. A file, [Link], stores the records of passengers using the 5
following structure :
[PNR, PName, BRDSTN, DESTN, FARE]
where :
PNR​ ​ –​ Passenger Number (string type)
PName​ –​ Passenger Name (string type)
BRDSTN​ –​ Boarding Station Name (string type)
DESTN​ –​ Destination Station Name (string type)
FARE​​ –​ Fare amount for the journey (float type)
Write user defined functions in Python for the following tasks :​
(i)​ Create() – to input data for passengers and write it in the binary
file [Link].
(ii)​ SearchDestn(D) –to read contents from the file [Link]
and display the details of those Passengers whose DESTN matches
with the value of D.
(iii)​ UpdateFare() – to increase the fare of all passengers by 5% and
rewrite the updated records into the file [Link].

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 22/27 ]
Ans (i) import pickle
​ def Create():
​ F=open("[Link]", "wb")
​ PNR=input("PNR No:")
​ PName=input("Name: ")
​ BRDSTN=input("Boarding at: ")
​ DESTN=input("Destination: ")
​ FARE=float(input("Fare: "))
​ Rec=[PNR,PName,BRDSTN,DESTN,FARE]
​ [Link](Rec,F)
​ [Link]()
OR
def Create():
​ F=open("[Link]", "wb")
​ REC=[]
while True:
PNR=input("PNR No:")
​ PName=input("Name: ")
​ BRDSTN=input("Boarding at: ")
​ DESTN=input("Destination: ")
​ FARE=float(input("Fare: "))
​ [Link]([PNR,PName,BRDSTN,DESTN,FARE])
C=input("More(Y/N)?")
if C =='N':
break
​ [Link](Rec,F)
​ [Link]()
OR
Any other equivalent code
(ii)
def SearchDestn(D):
try: # To be ignored
​ F=open("[Link]", "rb")
Rec=[Link](F)
for R in Rec:
if R[3]==D;
​ ​ print(R)
[Link]()
​ except: # To be ignored
​ ​ print("File not found!") # To be ignored
​ OR
def SearchDestn(D):
​ F=open("[Link]", "rb")
try:
​ while True:
​ Rec=[Link](F)
​ ​ if Rec[3]==D;
​ ​ ​ print(Rec)

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 23/27 ]

except EOFError:
​ print("EOF reached")
[Link]()

(iii)
def UpdateFare():
try:
FR=open("[Link]", "rb+")
Rec=[Link](FR)
for I in range(len(Rec)):
Rec[I][4]+=(Rec[I][4] * 0.05)
# Rec[I][4]=Rec[I][4] * 1.05)
print("Updation Done!")
[Link](0)
[Link](Rec, FR)
[Link]()
except:
print("File not found!")
OR
def UpdateFare():
FR=open("[Link]", "rb")
Rec=[]
try:
while True:
R=[Link](FR)
[Link](R)
except:
[Link]()
for I in range(len(Rec)):
Rec[I][4] = Rec[I][4] + (Rec[I][4] * 0.05)
# Rec[I][4]=Rec[I][4] * 1.05)
FP=open("[Link]", "wb")
[Link](Rec, FP)
[Link]()
OR
Any other equivalent code
(i)
(½ Mark for opening the file in correct mode)
(½ Mark for accepting from user/writing on file)
(ii)
(½ Mark for opening the file in correct mode)
(½ Mark for reading each record)
(½ Mark for correctly checking the condition)
(½ Mark for correctly printing the details of passengers)

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 24/27 ]
(iii)
(½ Mark for opening the file in correct mode)
(½ Mark for reading data)
(½ Mark for correctly modifying the Fare)
(½ Mark for writing the modified Fare in the Binary File)
37. ‘Swabhaav’ is a big NGO working in the field of Psychological Treatment and 5x1
Counselling, having its Head Office in Nagpur. It is planning to set up a center in =5
Vijayawada. The Vijayawada Center will have four blocks –ADMIN, PSYCHIATRY,
PSYCHOLOGY, and ICU. You, as a Network Expert, need to suggest the best
network-related solutions for them to resolve the issues/problems mentioned in
questions (i) to (v), keeping the following parameters in mind :

Block to Block distances (in metres) :


From To Distance
ADMIN PSYCHIATRY 65 m
ADMIN PSYCHOLOGY 65 m
ADMIN ICU 65 m
PSYCHIATRY PSYCHOLOGY 100 m
PSYCHIATRY ICU 50 m
PSYCHOLOGY ICU 50 m

Distance of Nagpur Head Office from Vijayawada Center = 700 km


Number of Computers in each block is as follows :
Block No. of Computers
ADMIN 16
PSYCHIATRY 40
PSYCHOLOGY 19
ICU 20

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 25/27 ]
(i) Suggest the most appropriate location of the server inside the
Vijayawada Center. Justify your choice.

(ii) Which hardware device will you suggest to connect all the computers
within each block of Vijayawada Center ?
(iii) Draw a cable layout to efficiently connect various blocks within the
Vijayawada Center.
(iv) Where should the router be placed to provide internet to all the
computers in the Vijayawada Center?
(v) (a)​The Manager at Nagpur wants to remotely access the computer in
Admin block in Vijayawada. Which protocol will be used for this ?
OR
(b)​Which type of Network (PAN, LAN, MAN or WAN) will be set up
among the computers connected with Vijayawada Center ?

Ans (i) PSYCHIATRY Block as it has the maximum number of Computers.


​ ​ ​ ​ OR
​ ADMIN Block as is generally the most secure.
​ ​ ​ ​ OR
​ ADMIN Block as is closest to all the blocks.
​ ​ ​ ​ OR
​ Any other location with valid justification.
(1 Mark for suggesting a block with valid justification)
(ii) Switch/Hub/Router (Any one)
(1 Mark for writing correct answer)
(iii)

OR

OR

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 26/27 ]
OR
Any other valid efficient cable layout
(1 Mark for drawing the correct cable layout)
(iv) Router should be placed where the server is placed.

Note: ​
As per the recent network technologies, Router can be connected in any of the
blocks as all the blocks are networked. So, the marks should be awarded
accordingly.
(1 Mark for writing the correct answer)
(v)
(a)​TELNET
OR
(b)​LAN or MAN or WAN (Not PAN)
(a)​(1 Mark for writing the correct answer)
OR
(b)​(1 Mark for writing the correct answer)

[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2025 Page: 27/27 ]

You might also like