aglasem.com
Home Schools Admission Career Mock Test PDF Docs Playground
ClassChoose class
StateSelect state

CBSE Class 12 Question Paper 2026 Solution Computer Science

Download the CBSE Class 12 Question Paper 2026 Solution Computer Science PDF for free at AglaSem. Get accurate, step-by-step solutions to every question so you can check your answers, learn the correct method and see how to score full marks.
CBSE Class 12 Question Paper 2026 Solution Computer Science - Page 1 of 28

Finished viewing? Save it for later —

Download CBSE Class 12 Question Paper 2026 Solution Computer Science (PDF · 28 pages)
Downloaded 30 times

About CBSE Class 12 Question Paper 2026 Solution Computer Science

CBSE Class 12 Question Paper 2026 Solution Computer Science is available here for free download. Published by CBSE for Class 12, this solution can be viewed online or downloaded as a PDF (28 pages). Candidates preparing for Class 12 can use CBSE Class 12 Question Paper 2026 Solution Computer Science to understand the exam pattern, the type of questions asked, and the overall difficulty level.

Frequently Asked Questions

How can I download CBSE Class 12 Question Paper 2026 Solution Computer Science?

Open this page and click the Download button to save CBSE Class 12 Question Paper 2026 Solution Computer Science as a PDF. It is completely free on AglaSem Docs.

Is CBSE Class 12 Question Paper 2026 Solution Computer Science free to download?

Yes. CBSE Class 12 Question Paper 2026 Solution Computer Science can be viewed online and downloaded as a PDF free of cost on AglaSem Docs.

How many pages does CBSE Class 12 Question Paper 2026 Solution Computer Science have?

CBSE Class 12 Question Paper 2026 Solution Computer Science contains 28 pages, which you can read online or download together as a single PDF.

Where can I find more Class 12 study material?

You can find more Class 12 question papers, sample papers, syllabus, and answer keys on AglaSem Docs.

CBSE Class 12 Question Paper 2026 Solution Computer Science – Text

Read the full text of this solution below — useful to quickly search, copy and reference the content online without downloading the PDF.

📄 View text version (28 pages)

Page 1

FOR CBSE CLASS 12 EXAM PREPARATION

CBSE Class 12 2026
Question Paper
Solution · Computer
Science
EXAM YEAR TYPE SUBJECT

CBSE Class 12 2026 Question Paper Solution Computer Science

Notes · Sample Papers · Previous Year Papers · Mock Tests

Page 2

m
m .co

m .co Marking Scheme ase
m
se ag
Strictly Confidential
l
(For internal and restricted use only)
Senior Secondary School Examination 2026
SUBJECT NAME: COMPUTER SCIENCE SUBJECT CODE: 083 (Set 4 Q.P. CODE 91)

General Instructions:
1 The CBSE has decided to introduce On Screen Marking (OSM) for the evaluation of
Class XII answer Book with the 2026 Examination.

m
.co
2 You are aware that evaluation is the most important process in the actual and correct
m
assessment of the candidates. A small mistake in evaluation may lead to serious problems
.co
which may affect the future of the candidates, education system and teaching profession.
s e m
em a
To avoid mistakes, it is requested that before starting evaluation, you must read and
s
understand the spot evaluation guidelines carefully.
a g l
l a
3
ag policy
“Evaluation
examinations
is a confidential policy as it is related to the confidentiality of the
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 Newspaper/Website, etc. may invite action under various rules
of the Board and IPC.”

4 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,
m
.co
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
em
them. In Class-XII, while evaluating two competency-based questions, please try to
s
la
understand given answer and even if reply is not from marking scheme but correct
g
competency is enumerated by the candidate, due marks should be awarded.
a
5 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.

6 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
m
.co
shall be given only after ensuring that there is no significant variation in the marking of
o m
c emCROSS ‘X’ be
individual evaluators.
. s
7m Evaluators will mark ( √ ) wherever answer is correct. For wrong answer
s l a an impression that
e marked. Evaluators will not put right (✓) while evaluating which ggives
la answer is correct and no marks are awarded. This is most a
ag
common mistake which
evaluators are committing.

8 If a question has parts, please award marks on the right-hand side for each part in the
OSM Portal. Marks awarded for different parts of the question will be totaled up by the
OSM System.

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

m .
.co m
​

s e
s em l a
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 1/27 ]

g la
a For more Question Papers, Sample Papers, Notes & Syllabus visit Page 1 of 27

Page 3

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 :-
● 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 The Examiners should acquaint themselves with the guidelines given in the “Guidelines
for Spot Evaluation” before starting the actual evaluation.

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

17 If a candidate attempts both alternatives/options in a question where only one option/
alternative is required to be attempted, the Evaluator shall award marks in both the
options. The system will take the higher of two scores and disregard the other
response.

18 In a question having two options/alternatives, if a candidate has attempted only one,
then the evaluator shall mark “NA” (Not attempted) against the option that has not
been attempted by the candidate.
​
​

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

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 2 of 27

Page 4

m
m .co

m .co MARKING SCHEME ase
m
se l
COMPUTER SCIENCEag083
Maximum 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) m
.co
The paper is divided into 5 Sections - A, B, C, D and E.
m
(iv)
.co
Section A consists of 21 questions (1 to 21). Each question carries 1 mark.
e m
s em of 7 questions (22 to 28). Each question carries 2 marks. glas
(v) Section B consists
a
(vi) SectiongCl consists of 3 questions (29 to 31). Each question carries 3 marks. a
a
(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:
m
.co
● The answers given in the marking scheme are SUGGESTIVE. Examiners are requested to
m
e
award marks for all alternative correct Solutions/Answers conveying a similar meaning
s
la
● All programming questions have to be answered with respect to Python only
g
a
● 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
m
.co
{MM/DD/YY} are correct.
m
.co m
● In SQL related questions – semicolon should be ignored for terminating the SQL statements

m
● In SQL related questions – ignore case sensitivity s e
s e ● In SQL output questions – ignore the column headers
g l a
g la ● In SQL output questions – ignore the order of rows until ORDER BY is specified a
a SECTION A (21x1=21)
1. State True or False : 1
In Python, data type of 74 is same as the data type of 74.0.
Ans False
(1 mark for writing the correct answer)

m .
.co s e m
s em l a
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 3/27 ]

la
​
​
​
​

g
​
​

a
​
​
​
​

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 3 of 27

Page 5

2. Identify the output of the following code snippet : 1
s = "the Truth"
print(s.capitalize())
(A) The truth (B) THE TRUTH
(C) The Truth (D) the Truth

Ans (A) The truth
(1 Mark for writing the correct option)
3. Which of the following expressions in Python evaluates to True ? 1
(A) 2>3 and 2<3 (B) 3>1 and 2
(C) 3>1 and 3>2 (D) 3>1 and 3<2

Ans (C) 3>1 and 3>2 (B) 3>1 and 2
(1 Mark for writing ANY ONE of the correct option)
4. What is the output of the following code snippet ? 1
s='War and Peace by Leo Tolstoy'
print(s.partition("by"))
(A) ('War and Peace ', 'by', ' Leo Tolstoy')
(B) ['War and Peace ', 'by', ' Leo Tolstoy']
(C) ('War and Peace ', ' Leo Tolstoy')
(D) ['War and Peace ', ' Leo Tolstoy']

Ans (A) ('War and Peace ', 'by', ' Leo Tolstoy')
(1 Mark for writing the correct option)
5. What will be the output of the following statement ? 1
print("PythonProgram"[-1:2:-2])
Ans mroPo
(½ Mark for writing first character of output correctly i.e. 'm')
(½ Mark for writing remaining characters correctly i.e. 'roPo')
6. What will be the output of the following code snippet ? 1
t = tuple('tuple')
t2 = t[2],
t += t2
print(t)
(A) ('tuple')
(B) ('tuple', 'p')
(C) ('t', 'u', 'p', 'l', 'e', 'p')
(D) ('t', 'u', 'p', 'l', 'e')

Ans (C) ('t', 'u', 'p', 'l', 'e', 'p')

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

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 4 of 27

Page 6

m
m .co

m .co s em
la in Python?
(1 Mark for writing the correct option)
se 7.
a g
Which of the following statements is true about dictionaries 1
(A) A dictionary is an example of sequence datatype.
(B) A dictionary cannot have two elements with same key.
(C) A dictionary cannot have two elements with same value.
(D) The key and value of an element cannot be the same.

Ans (B) A dictionary cannot have two elements with same key.
m
m
(1 Mark for writing the correct option)
.co
8. .co
If L is a list with 6 elements, then which of the following statements will raise
s
1 e m
s em l a
ag
an exception ?

g la
(A) L.pop(1) (B) L.pop(6)
a
(C) L.insert(1,6) (D) L.insert(6, 1)

Ans (B) L.pop(6)
(1 Mark for writing the correct option)
9. What will be the output of the following code ? 1
def f1(a,b=1):
m
.co
print(a+b,end='−')

em
c=f1(1,2)
print(c,sep='*')
s
la (B) 3–2*
(A) 3-2 g
a (D) 3*None-
(C) 3–None

Ans (C) 3–None
(1 Mark for writing the correct option)
10. Consider the statement given below : 1
f1 = open("pqr.dat", "__________")
m
m
Which of the following is the correct file mode to open the file in read only
.co
m .co mode ?
s e m
s e (A) a (B) rb
g l a
g la (C) r+ (D) rb+ a
a
Ans (B) rb
(1 Mark for writing the correct option)
11. State whether the following statement is True or False : 1
In Python, Logical errors can be handled using try…except…finally statement.
Ans False
m .
.co s e m
s em l a
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 5/27 ]

la
​

ag For more Question Papers, Sample Papers, Notes & Syllabus visit Page 5 of 27

Page 7

(1 mark for writing the correct answer)
12. A table has two candidate keys, one of which is chosen as the primary key. How 1
many alternate keys does this table have ?
(A) 0 (B) 1
(C) 2 (D) 3

Ans (B) 1
(1 Mark for writing the correct option)
13. Which of the following SQL command can change the degree of the existing 1
relation ?
(A) DROP TABLE (B) ALTER TABLE
(C) UPDATE...SET (D) DELETE

Ans (B) ALTER TABLE
(1 Mark for writing the correct option)
14. What will be the output of the query ? 1
SELECT MACHINE_ID, MACHINE_NAME FROM INVENTORY
WHERE QUANTITY <= 100;
(A) All columns of INVENTORY table with quantity greater than 100
(B) ID and name of machines with quantity less than 100 from INVENTORY
table
(C) All columns of INVENTORY table with quantity greater than or equal to
100
(D) ID and name of machines with quantity less than or equal to 100 from
INVENTORY table.
Ans (D) ID and name of machines with quantity less than or equal to 100 from
INVENTORY table.
(1 Mark for writing the correct option)
15. A relation in MySQL database consists of 2 tuples and 3 attributes. If 2 1
attributes are deleted and 4 tuples are added, what will be the cardinality of
the relation ?
(A) 4 (B) 5
(C) 6 (D) 7

Ans (C) 6
(1 Mark for writing the correct option)
16. Which aggregate function in SQL returns the smallest value from a column in 1
a table ?
(A) MIN() (B) MAX()

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

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 6 of 27

Page 8

m
m .co

m .co s e m
se
(C) SMALL() (D) LOWER()
g l a
Ans (A) MIN()
a
(1 Mark for writing the correct option)
17. With respect to computer networks, which of the following is the correct 1
expanded form of RJ 45?
(A) Radio Jockey 45 (B) Registered Jockey 45

m
.co
(C) Radio Jack 45 (D) Registered Jack 45

o m m
. c s e
e m
Ans (D) Registered Jack 45
l a
s
(1 Mark forawriting the correct option)
l a g
18. Which a
g
network device serves as the entry and exit point of a network, as all data 1
coming in or going out of a network must first pass through it in order to use
routing paths ?
(A) Modem (B) Gateway

(C) Switch (D) Repeater

Ans (B) Gateway
m
(1 Mark for writing the correct option)
m .co
19. Expand the term XML. s e 1

g la
Ans Extensible Markup Language
a
(½ Mark for writing the correct full form of X as eXtensible)
(½ Mark for writing correct full form of ML as Markup Language)
Q.Nos. 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).
m
.co
(B) Both Assertion (A) and Reason (R) are true and Reason (R) is not the
m
.co m
correct explanation for Assertion (A).

m s e
(C) Assertion (A) is true, but Reason (R) is false.
s e g l a
(D) Assertion (A) is false, but Reason (R) is true.
l a a
ag 20. Assertion (A): [1,2,3]+'123' is an invalid expression in Python. 1
Reason (R): In Python, a list cannot be concatenated with a string.
Ans (A) Both Assertion (A) and Reason (R) are true and Reason (R) is the
correct explanation for Assertion (A).
(1 Mark for writing the correct option)
21. Assertion (A) : The PRIMARY KEY constraint in SQL ensures that each value in 1
m .
.co s e m
s em l a
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 7/27 ]

g la
​

a
​

​

​

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 7 of 27

Page 9

the column(s) is unique and cannot be NULL.
Reason (R) : Candidate keys are not eligible to become a primary key.
Ans (C) Assertion (A) is true, but Reason (R) is false.
(1 Mark for writing the correct option)

SECTION B (7x2=14)
22. What is the difference between default parameters and positional 2
parameters in Python ? Also give an example of a function header which
uses both.
Ans ● Default parameters have default values whereas positional parameters are
assigned values to them based on their position in the function call.
● In a function header, default parameters are always written after
positional parameters(if any).
OR
Any other valid difference (only one)
Example :
def Q22(X, Y=10): # Here Y is default & X is positional
# parameter
OR
Any other valid example
(1 mark for writing any one correct difference)
(1 mark for writing any one correct example uses both type)
OR
(Full 2 marks for correct explanation with the help of a suitable example)
23. Write a Python statement to perform the following tasks : (USE BUILT_IN 2
FUNCTIONS/METHODS ONLY)

(i) To create a new list L1 containing the elements of list L arranged in
ascending order, without modifying list L.
Ans (i) L1=sorted(L)
OR
L1=list(L)
L1.sort()
OR
Any other correct option
(1 mark for writing the correct statement)
OR
(½ mark for only mentioning the correct method(s) or function(s))
(ii) A statement to check whether the given character, ch is an alphabet or
a number.
Ans (ii) ch.isalnum()
OR
​
​

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

​
​

​

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 8 of 27

Page 10

m
m .co

m .co ch.isdigit() or ch.isalpha() s e m
se OR
g l a
Any other method(s) for the required task a
(1 mark for writing the correct statement with a method/combination of
methods)
OR
(½ mark for only mentioning the method(s) or function(s))
24. Assuming that D1 is a dictionary in Python, 2

m
.co
(i) (a) Write a Python expression to check if the key, 'RNo' is present in
D1.
o m m
c
. D1 s e
ORe m
Ans (i) (a) 'RNo' in
l a
l as in D1.keys()
'RNo' ag
agfor writing the correct statement)
(1 mark
OR
(½ mark for only mentioning the 'in' or correct equivalent operator(s) )
OR
(i) (b) Write a Python expression to check if any key in D1 has a value 12.
Ans (i) (b) 12 in D1.values()

m
.co
(1 mark for writing the correct statement)
OR

s em
(½ mark for only mentioning the 'in' or correct equivalent operator(s) )
(ii) (a) Write a single statement g la a BUILT_IN function to add the key :
value pair 'RNo':12, a
using
if the key 'RNo' is not present in D1.
However, if the key 'RNo' is present, the function should return its
value.
Ans
(ii) (a) D1.setdefault('RNo',12)
OR
if D1.get('RNo'):
m
.co
print(D1['RNo']) # return D1['RNo']
m else:

m .co D1['RNo']=12
s e m
s e OR
g l a
g la Any other correct equivalent statement a
a (1 mark for writing the correct statement)
OR
(½ mark for mentioning setdefault/equivalent command/statement)

OR
(ii) (b) Write a single statement to delete all the elements from D1.

m .
.co s e m
s em l a
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 9/27 ]

g la
a For more Question Papers, Sample Papers, Notes & Syllabus visit Page 9 of 27
​

Page 11

Ans (ii) (b) D1.clear()
OR
D1={}
OR
D1=dict()
(1 mark for writing the correct statement)
OR
(½ mark for mentioning the method or function)
25. What possible output(s) from the given options will NOT be displayed when the 2
following code is executed ? Also, mention, for how many iterations the for loop
in the given code will run ?

import random
a = [1,2,3,4,5,6]
for i in range(4):
j=random.randrange(i,5)
print(a[j],end='–')
print( )
Options :
(A) 3–4–5–4– (B) 2–2–4–5–
(C) 4–3–3–5– (D) 5–1–2–4–

Ans (D) 5–1–2–4–
The for loop will run for 4 iterations.

(1 mark for writing each correct answer)
26. The function given below is written to accept a string s as a parameter and 2
return the number of vowels appearing in the string. The code has certain errors.
Observe the code carefully and rewrite it after removing all the logical and
syntax errors. Underline all the corrections made.
def CountVowels(s):
c=0
for ch in range(s):
if 'aeiouAEIOU' in ch:
c=+1
return(ch)
Ans def CountVowels(s):
c=0
for ch in s: #Correction-1
if ch in 'aeiouAEIOU': #Correction-2
c+=1 #OR c=c+1 #Correction-3
return(c) #Correction-4
OR

def CountVowels(s):
c=0
​

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

​
​

​
​
​
​
​

​
​

​

​
​
​
​
​

​
​

​

​
​

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 10 of 27
​

Page 12

m
m .co

m .co for ch in range(len(s)): s e m
#Correction-1
se if s[ch] in 'aeiouAEIOU':
g l a #Correction-2

return c
c=c+1 a #Correction-3
#Correction-4

(½ mark for each correction)
OR
(Full 2 mark for writing the corrected code)
OR
(Total 1 mark for identification of all/any three errors without correction)
m
m
27. Ms. Zoya is a Production Manager in a factory which packages mineral water. 2
.co
.co
She decides to create a table in a database to keep track of the stock present in
s e m
em
the factory. Each record of the table will have the following fields :
s l a
W_Code la
g – Code of the item (type – CHAR (5)) ag
B_Qty
a
W_Description – Description of the item (type – VARCHAR (20))
– Balance quantity of the item (type – INTEGER)
U_Price – Unit Price of the item (type – FLOAT)
The name of the table is W_STOCK.
(i) (a) Write an SQL command to create the above table (W_Code should
be the primary key).
Ans (i) (a) CREATE TABLE W_STOCK
(W_Code CHAR(5) PRIMARY KEY, m
W_Description VARCHAR (20),
m .co
e
B_Qty INTEGER, #OR B_Qty INT/B_Qty DECIMAL(4)
s
la
U_Price FLOAT);#OR U_Price FLOAT(7,2)

OR ag
#OR U_Price DECIMAL(7,2)

Any other correct answer

(½ mark for correct command CREATE TABLE)
(½ mark for correctly mentioning all the columns and their respective
attributes)
OR
Can U_Price be the primary key of the above table? Justify m
.co
(i) (b)

o m your answer.
m
c
Ans. (i) (b)
s e
No, U_Price cannot be the primary key because it may
s em contain duplicate and Null values.
g l a
g la (½ mark for writing ‘No’) a
a (½ mark for correct justification)
(ii) (a) Assuming that the table W_STOCK is already created, write an
SQL command to add an attribute E_Date (of DATE type) to the table.
Ans (ii) (a) ALTER TABLE W_STOCK ADD COLUMN E_Date DATE;
OR
ALTER TABLE W_STOCK ADD E_Date DATE;

m .
.co m
​
​

​
​

​

​

e
​

em l as
s
​

​

ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 11/27 ]
​

la
​

​
​

​

ag
​

​

​
​
​

​
​

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 11 of 27
​

​

Page 13

(½ mark for correct command ALTER TABLE )
(½ mark for correctly adding column using ADD)

OR
(ii) (b) Assuming that the table W_STOCK is already created, write an SQL
command to remove the column B_Qty from the table.
Ans (ii) (b) ALTER TABLE W_STOCK DROP COLUMN B_Qty;
OR
ALTER TABLE W_STOCK DROP B_Qty;
(½ mark for correct command ALTER TABLE )
(½ mark for correctly deleting column using DROP )

28. (a) List one advantage and one disadvantage of Bus topology. 2
Ans (a) Advantages :
● Cost-effective: As it requires less cable.
● Easy to install
● Easy to extend for small networks.

Disadvantages :
● Failure of the main backbone brings down the entire network.
● Fault isolation is difficult.
● Not suitable for large networks
● Data collisions are frequent when many devices are connected.
● Network speed slows down with heavy traffic.
● Security is low as all devices can access transmitted data.
(1 mark for writing any one correct advantage)
(1 mark for writing any one correct disadvantage)
OR
(b) What is protocol in the context of computer networks? Which protocol is
used to transmit hypertext across the web?
Ans (b) A protocol is a set of rules that need to be followed by the communicating
devices in order to have successful and reliable data communication.
The protocol used to transmit hypertext across the web is
Hypertext Transfer Protocol (HTTP)

(1 mark for correctly defining protocol)
(1 mark for writing Hypertext Transfer Protocol or HTTP or HTTPS, any one)

SECTION C (3x3=9)
29. 3
(a) Write a Python function that counts and returns the number of digits
appearing in the text file "Space.txt". For example, if the file contains :
​

​
​

​
​
​

​
​
​

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

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 12 of 27

Page 14

m
m .co

m .co s e m
se
Space exploration has unlocked incredible advancements
in technology and science. Since the first moon landing g l a
in 1969, space agencies have sent probes to Mars, a
Jupiter and beyond. The ISS, orbiting Earth at about
400 km, serves as a hub for research. With missions
planned for 2030, humanity’s cosmic journey continues!

Then the function should return 11.

Ans (a)
m
.co
def CountDigits():
m
.co
with open("Space.txt",'r') as F:
e m
Data=F.read()
e m l as
C=0
l as
for CH in Data: ag
ag
if CH.isdigit(): # OR if CH in '0123456789'
C+=1 # OR if CH >= '0' and CH <= '9'
return C
OR
def CountDigits():
F = open("Space.txt")
All=F.readlines()
C=0
m
.co
for Line in All:
for CH in Line:
e m
C+=1 las
if CH.isdigit(): # OR if CH in '0123456789'
# OR if CH >= '0' and CH <= '9'
F.close() ag
OR
Any other equivalent correct code
(½ mark for opening the file in default/correct mode)
(½ mark for correct reading or similar operation)
(½ mark for correct iteration)
(½ mark for correctly checking the condition)
m
.co
(½ mark for initializing and incrementing the counter correctly)
m
.co
(½ mark for returning the count)
e m
em l as OR

las g
g (b) Write a Python function that displays the words in awhich the lowercase
a letter 'e' appears at least twice in the text file 'Space.txt'. For
example, if the file contains :
Space exploration has unlocked incredible advancements
in technology and science. Since the first moon landing
in 1969, space agencies have sent probes to Mars,
Jupiter and beyond. The ISS, orbiting Earth at about
400 km, serves as a hub for research. With missions

m .
.co s e m
em a
​

s l
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 13/27 ]

g la
a For more Question Papers, Sample Papers, Notes & Syllabus visit Page 13 of 27

Page 15

planned for 2030, humanity’s cosmic journey continues!

Then the function should display:
incredible advancements science. agencies serves
research.

Ans (b)
def showWords():
with open("Space.txt",'r') as F:
All=F.read()
Words=All.split()
for word in Words:
if word.count('e')>=2:
print(word, end=' ')
OR
def showWords():
F = open("Space.txt") #'r'/ 'rt' is optional
All=F.readlines()
for L in All:
Words=L.split()
for Word in Words :
C=Word.count('e')
if C>=2:
print(Word, end= ' ')
F.close()
OR
Any other equivalent correct code
(½ mark for opening the file in default/correct mode)
(½ mark for correct reading or similar operation)
(½ mark for correct iteration)
(1 mark for correctly checking the condition)
(½ mark for displaying the result)
30. 3x1
(a) A stack named FruitStack, implemented using list, contains records of =3
some fruits. Each record is represented as a dictionary with keys 'Name',
'Origin', 'Price' and 'Expiry'. A sample record is given here:

{'Name':'Apple','Origin':'France','Price':120,
'Expiry':'12-08-2025'}
Write the following user–defined functions in Python to perform the
specified operations on FruitStack :

(i) push_fruit(FruitStack,Fruit): This function takes the stack
FruitStack and a new record Fruit as arguments and pushes the
record stored in Fruit onto FruitStack if the Price is less than
100.

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

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 14 of 27

Page 16

m
m .co

m .co s e m
se
(ii) pop_fruit(FruitStack): This function pops
la the
record from the stack and returns it. If thegstack
topmost

the function should display "UNDERFLOW". a is already empty,

(iii) display(FruitStack): This function displays all the elements of
the stack starting from the topmost element. If the stack is empty,
the function should display 'EMPTY STACK'.

Ans
m
.co
(i) def push_fruit(FruitStack, Fruit):
m
.co
if Fruit['Price']<100:
FruitStack.append(Fruit)
e m
OR
em l as
as
def push_fruit(FruitStack, Fruit):
l
#Option 2(i)
ag
ag if Fruit['Price']<100:
FruitStack.insert(0,Fruit)
OR
Any similar, equivalent, correct code

(½ mark for correctly checking the condition)
(½ mark for correctly pushing Fruit)

(ii) def pop_fruit(FruitStack):
if FruitStack==[]:
m
.co
# OR if not FruitStack:
# OR if len(FruitStack)==0:
print('UNDERFLOW') e m
else:
las
return FruitStack.pop()
ag
OR
def pop_fruit(FruitStack): #Option 2(ii)
if FruitStack==[]:
# OR if not FruitStack:
# OR if len(FruitStack)==0:
print('UNDERFLOW')
else:
return FruitStack.pop(0)
m
.co
OR
m
.co
Any similar, equivalent, correct code
e m
e m (½ mark for correctly checking and displaying 'Underflow')
l as
las (½ mark for correctly popping and returning the element)
ag
ag (iii) def display(FruitStack):
if FruitStack==[]:
# OR if not FruitStack:
# OR if len(FruitStack)==0:
print('EMPTY STACK')
else:
for ele in FruitStack[::-1]:
print(ele)
OR
m .
.co m
​

s e
em
​
​

a
​
​

s l
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 15/27 ]
​

la
​
​

​

g
​
​

a
​
​

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 15 of 27
​

Page 17

def display(FruitStack): #Option 2(iii)
if FruitStack==[]:
# OR if not FruitStack:
# OR if len(FruitStack)==0:
print('EMPTY STACK')
else:
for ele in FruitStack:
print(ele)
OR
Any similar, equivalent, correct code
(½ mark for correctly checking the whether the stack is empty)
(½ mark for correctly displaying the stack)

OR
(b) Write a Python program to accept 10 integers from the user. If the entered
number is a three digit even integer, push it onto a stack. After all inputs are
taken, pop all the three-digit even integers from the stack and display them.
For example, if the user enters 12, 31, 320, 457, 6, 92, 924, 220,
1, 218, then the stack should contain :
320, 924, 220, 218

and the output of the program should be :
218 220 924 320
Ans (b) Stack=[] #Stack
for C in range(10):
Num=int(input("Integer:"))
if Num>=100 and Num<=999 and Num%2==0:
#if len(str(Num))==3 and Num%2==0:
Stack.append(Num)
while Stack:
print(Stack.pop(), end=' ')
OR
Any similar, equivalent, correct code with/without user defined function
(½ mark for correctly declaring/defining the stack)
(½ mark for correctly entering/inputting the numbers in a loop)
(½ mark for correctly checking the condition)
(½ mark for pushing the correct number)
(½ mark for the correct loop)
(½ mark for correctly popping and displaying the stack elements)
31. (a) Write the output of the following code : 3
def Exam2026(given) :
new=[]
for ch in given [1:-1]:
if ch.isupper():
new.reverse()
elif ch not in new:
new.append(ch)
elif ch in new:
​
​
​

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

​
​
​
​

​
​

​
​

​

​

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 16 of 27
​

​

​

​
​

​

​
​

​

​
​

​

Page 18

m
m .co

m .co new.pop() s e m
se print(new)
g l a
Exam2026("Gold-24Medals") a
Ans (a) ['4', '2', '-', 'd', 'l', 'o']
(½ Mark for each correct letter/digit/sign in the right order)
(Deduct ½ mark if the container list is not correctly shown)
OR
(b) Write the output of the following code
def Exam2026(given):
m
new = 0
m .co
.co m
while given:
m if new % 2:
s e
s e new += given % 10 l a
g l a else: ag
a new += given % 5
print(new, end = '-')
given //= 10
Exam2026(123456)
Ans (b) 1-6-10-13-15-16-
(½ mark for each correct number in the right order)
(Deduct ½ mark if the dashes ( - ) are not shown or incorrectly shown)
m
SECTION D
m .co (4x4=16)

s e
32. Abhishek has created a table, named STOCK, with a set of records to maintain 4

g la
the data of packaged milk in his shop. After creating the table, he entered the
data and the table looked as follows : a
Code Type Volume Qty Price
AF0.5 F 0.5 300 38.00
MF0.5 F 0.5 250 36.50
MT1.0 T 1.0 150 64.00
AT1.0 T 1.0 100 66.00
o m
m . c
c. oPD1.0 D
s 30.00
1.0 50
e m52.00

e m PT0.5 l a
l as T 0.5 78
ag for the following
ag
(a) Based on the data given above, write the SQL queries
tasks:
(i) To display Type and the maximum Price for each Type of milk.

Ans (a)
(i) SELECT TYPE, MAX(PRICE) FROM STOCK
GROUP BY TYPE;

m .
.co m
​

​

​
​

e
​

s
​

em
​
​

​
​

​

a
​

​

​
​

​

​

​
​

​

l
​

​

​
​

​
​

​

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

la ag
ag
​
​

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 17 of 27
​

​

Page 19

(½ Mark for SELECT TYPE, MAX(PRICE) FROM STOCK)
(½ Mark for GROUP BY TYPE;)
(ii) For each record, increase the Price by 0.5 where Type is 'F'.

Ans (ii) UPDATE STOCK
SET PRICE=PRICE+0.5 WHERE TYPE='F';
(½ Mark for UPDATE STOCK)
(½ Mark for SET PRICE=PRICE+0.5 WHERE TYPE='F')
(iii) To display the total value of the stock (total of Qty × Price).

Ans (iii) SELECT SUM(QTY*PRICE) FROM STOCK;

(½ Mark for correct SELECT ...FROM...)
(½ Mark for SUM(QTY*PRICE))
(iv) To display the details of all records where Code starts with 'A'.

Ans (iv) SELECT * FROM STOCK
WHERE CODE LIKE 'A%'; OR WHERE CODE LIKE 'A_ _ _ _'
(½ Mark for correct SELECT ...FROM...)
(½ Mark for for correct condition)
OR

(b) Considering the table STOCK as given above, write the output on execution
of the following queries :
(i) SELECT Volume, Qty, Price FROM STOCK
WHERE Type IN ('F','D');

Ans (i) VOLUME QTY PRICE
0.5 300 38.00
0.5 250 36.50
1.0 50 52.00
(½ Mark for any 2 rows with correct values)
(½ Mark for remaining row with correct values)
Note: Ignore the output header
(ii) SELECT Code, Qty FROM STOCK
WHERE Price BETWEEN 30 AND 50;

Ans (ii) CODE QTY
AF0.5 300
MF0.5 250
PT0.5 78
(½ Mark for any 2 rows with correct values)
​

​

​

​
​

​

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

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 18 of 27

Page 20

m
m .co

m .co s e m
se
(½ Mark for remaining row with correct values)
Note: Ignore the output header
g l a
(iii) SELECT DISTINCT Type FROM STOCK;
a
Ans (iii) DISTINCT TYPE
F
T
D

(½ Mark for any 2 rows with correct values)
m
m
(½ Mark for remaining row with correct value)
.co
.co
Note: Ignore the output header
s e m
(iv)
s em
SELECT Volume, count(*) FROM STOCK l a
g la GROUP BY Volume; ag
a
Ans (iv) VOLUME COUNT(*)
0.5 3
1.0 3

(½ Mark for one row with correct values)
(½ Mark for remaining row with correct values)
33. A csv file "States.csv" contains some data about all the states of India. Each 4
m
.co
record of the file contains the following data :
● Name of the State
● Capital of the State e m
● Population of the State
las
● Official Language of the State
ag
For example, a sample record in the file is :
['Andhra Pradesh','Amaravati',52221000,'Telugu']
Write a Python program which reads the data from this file and appends all
those records where population is more than 10000000 into another csv file
'More.csv'.
Note : "States.csv" also contains the Header row. The Header row should
NOT be copied to "More.csv".
Ans import csv m
m with open('States.csv') as F1 :
.co
m .co with open('More.csv','a',newline='') as F2:
# file mode 'w' is also acceptable s e m
s e R=csv.reader(F1)
g l a
g la W=csv.writer(F2) a
a RECS=list(R)
for rec in RECS[1:]:#skipping the Header row
if int(rec[2])>10000000:
W.writerow(rec)
OR
import csv
F1=open('States.csv')
F2=open('More.csv','a') # mode 'w' is also acceptable

m .
.co e m
​

em as
​
​

s l
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 19/27 ]

la
​
​
​
​

ag For more Question Papers, Sample Papers, Notes & Syllabus visit Page 19 of 27

Page 21

R=csv.reader(F1)
W=csv.writer(F2)
RECS=list(R)
for rec in RECS[1:]: #skipping the Header row
if int(rec[2])>10000000:
W.writerow(rec)
F1.close()
F2.close()
OR
import csv
F1=open("States.csv","r")
R=list(csv.reader(F1))
Data=[]
for rec in R[1:]: #skipping the Header row
if int(rec[2])>10000000:
Data.append(rec)
F1.close()

F2=open("More.csv","w")
W=csv.writer(F2)
W.writerows(Data)
F2.close()
OR
Any similar, equivalent, correct code
(½ mark for correctly opening "States. csv")
(½ mark for correctly opening "More. csv")
(½ mark for correctly creating the reader object)
(½ mark for correctly creating the writer object)
(½ mark for correctly skipping the header row)
(½ mark for iteration of records)
(½ mark for correctly checking the condition)
(½ mark for correctly writing the record in "More. csv")
Note:
● Ignore newline clause , Ignore import csv, Ignore close() method(s)
34. Assume that you are the Manager of the Loans department of a Finance House. 4x1
To keep track of the loans you have created two tables : CUSTOMERS and =4
LOANS. The sample data in these tables is given below :
Table : CUSTOMERS
C_ID C_Name Phone

00001 Raj Malhotra 1234567890

00003 David Xavier 3456789012

00004 Damini Iyer 3156789012

00008 Abdul 2345678901
Table : LOANS
SNo C_ID L_Amt L_Date Terms RoI

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

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 20 of 27

Page 22

m
m .co

m .co s em
se
1 00003 200000 2025-12-06
g l a 60 7.80

2 00008 2500000 2023-08-09 a 60 9.00

3 00001 500000 2025-08-13 48 6.00

4 00003 300000 2026-12-07 36 8.00

5 00004 600000 2026-12-07 60 6.00

Note :The tables may contain more records than shown here.
The management of the Finance House needs certain reports from you. m
m
Write the queries to extract the following data to create the reports :
.co
.co
(i) Number of records from LOANS table where Rate of Interest (RoI) is above 7.0.
s e m
s em l a
la ag
Ans (i) SELECT COUNT(*) FROM LOANS
g
WHERE RoI > 7.0;
a
(½ Mark for SELECT COUNT(*) FROM LOANS)
(½ Mark for WHERE RoI > 7.0)
(ii) Names of the customers whose loan amount (L_Amt) is above 1000000.
(ii) SELECT C_Name
FROM CUSTOMERS
JOIN LOANS ON CUSTOMERS.C_ID = LOANS.C_ID
WHERE L_Amt > 1000000; m
OR
m .co
SELECT C_Name
s e
la
FROM CUSTOMERS, LOANS
WHERE CUSTOMERS.C_ID = LOANS.C_ID
AND L_Amt > 1000000; ag
OR
SELECT C_Name
FROM CUSTOMERS
NATURAL JOIN LOANS
WHERE L_Amt > 1000000;
OR
SELECT C_Name
FROM CUSTOMERS
m
m JOIN LOANS ON CUSTOMERS.C_ID = LOANS.C_ID
.co
.co m
WHERE L_Amt > 1000000
m OR GROUP BY C_Name;
s e
s e g l a
g la SELECT C_Name a
a FROM CUSTOMERS
JOIN LOANS ON CUSTOMERS.C_ID = LOANS.C_ID
GROUP BY C_Name
HAVING SUM(L_Amt) > 1000000;
OR
Any other correct SQL Command
(½ Mark for correct selection from both the tables)
(½ Mark for correct uses of JOIN and WHERE clause)
m .
.co s e m
s em l a
​

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

g la
a For more Question Papers, Sample Papers, Notes & Syllabus visit Page 21 of 27

Page 23

(iii) C_ID, C_Name, and Terms of all those records where Loan Date
(L_Date) is after 31st December, 2024.
(iii)
SELECT L.C_ID, C_NAME, TERMS
FROM CUSTOMERS C, LOANS L
WHERE C. C_ID = L.C_ID AND L_DATE > '2024-12-31';
OR
SELECT CUSTOMERS.C_ID, C_Name, Terms
FROM CUSTOMERS
JOIN LOANS ON CUSTOMERS.C_ID = LOANS.C_ID
WHERE L_Date > '2024-12-31';
OR
SELECT CUSTOMERS.C_ID, C_Name, Terms
FROM CUSTOMERS, LOANS
WHERE CUSTOMERS.C_ID = LOANS.C_ID
AND L_Date > '2024-12-31';
OR
SELECT C.C_ID, C_NAME, TERMS
FROM CUSTOMERS C NATURAL JOIN LOANS
WHERE L_DATE > '2024-12-31';
OR
SELECT C.C_ID, C.C_Name, L.Terms
FROM CUSTOMERS C, LOANS L
WHERE C.C_ID = L.C_ID
AND L.L_Date > '2024-12-31';
OR
Any other correct SQL Command
(½ Mark for correct selection from both tables)
(½ Mark for correct uses of JOIN and WHERE clause)
(iv) (a) Details of all the loans in the descending order of RoI.
(iv)(a)
SELECT * FROM LOANS
ORDER BY RoI DESC;
OR
Any other correct SQL Command
(½ Mark for correct SELECT ... FROM...)
(½ Mark for correct use of ORDER BY ...)
OR
(iv) (b) C_ID and average term for each C_ID from the LOANS table.
(iv) (b)
SELECT C_ID, AVG(TERMS) FROM LOANS
GROUP BY C_ID;
OR
Any other correct SQL Command
​

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

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 22 of 27

Page 24

m
m .co

m .co s e m
la
(½ Mark for correct SELECT Query with AVG or SUM/COUNT function)
se (½ Mark for correct use of GROUP BY)
ag
35. Peter has created a table named Account in MySQL database, SCHOOL, having 4
following structure :
● Stud_id – integer
● Sname – string
● Class – string
● Fees – float
Help him in writing a Python program to display records of those students whose
fees is less than 5000. m
m
Note the following to establish connectivity between Python and MySQL :
.co
.co
● Username – admin
s e m
em
● Password – root
s l a
la ag
● Host - localhost

ag
Ans import pymysql as pm # OR import mysql.connector as pm
DB = pm.connect(host='localhost',user='admin', \
password='root', database = 'SCHOOL'))
CUR = DB.cursor()
SQL = "SELECT * FROM Account WHERE Fees<5000"
CUR.execute(SQL)
Data=CUR.fetchall( )
for D in Data:
m
.co
print(D)
DB.close()
OR e m
import pymysql as pm
las
# OR import mysql.connector as pm

ag
DB = pm.connect(host='localhost',user='admin', \
password='root', database = 'SCHOOL'))
CUR = DB.cursor()
SQL = "SELECT * FROM Account WHERE Fees<5000"
CUR.execute(SQL)
for C in CUR:
print(C)
DB.close()
OR
m
.co
Any equivalent valid and correct code
m for creating correct connectivity)
c. o(1(½Mark s e m
e m (½ Mark for correct formation of Query)
Mark for creating the cursor)
l a
las ag
ag (½ Mark for correct execution of the query)
(½ Mark for correctly fetching the data with/without using fetchall)
(1 Mark for correctly displaying the data )
Note:
(½ Mark for importing correct module, if the marks allocated are less than 4)
SECTION E (2x5=10)

m .
.co e m
​
​
​

s
​

em
​

a
​
​

s l
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 23/27 ]

la
​

g
​

a For more Question Papers, Sample Papers, Notes & Syllabus visit Page 23 of 27

Page 25

36. NextStep is an organization which has a pool of resource persons to conduct 2+3=
training workshops on various topics related to ICT. The data of all its Resource 5
Persons is stored in a binary file 'RESOURCES.DAT' using the following record
structure (each record is a tuple) :
(R_ID, R_Name, R_Expertise, Charges)
where :
R_ID – Resource Person’s ID (An integer)
R_Name – Resource Person’s Name (A string)
R_Expertise – Area of expertise of the Resource Person
Charges – Charges (in rupees) per hour to conduct a workshop
For example, a record in the file is :
(12,'P. Velusami', 'Machine Learning',5000)
In this context, write the following user defined functions in Python :

(i) Append() – To input the data of a Resource Person and write it in the file
RESOURCES.DAT.
Ans (i)
import pickle
def Append(): #Assuming independent tuples in file
F=open("RESOURCES.DAT","ab")
R_ID = int(input("Resource Person ID:"))
R_Name = input("Resource Person Name:")
R_Expertise = input("Area of Expertise:")
Charges = int(input("Hourly Charges:"))
Rec=(R_ID, R_Name, R_Expertise, Charges)
#[R_ID, R_Name, R_Expertise, Charges] also valid
pickle.dump (Rec, F)
F.close()
OR
def Append(): #Assuming list of tuples in file
with open("RESOURCES.DAT","rb+") as F:
Rec=pickle.load(F)
R_ID = int(input("Resource Person ID:"))
R_Name = input("Resource Person Name:")
R_Expertise = input("Area of Expertise:")
Charges = int(input("Hourly Charges:"))
Rec.append((R_ID, R_Name, R_Expertise, Charges))
F.seek(0)
pickle.dump(Rec,F)
OR
# Also consider a code, which reads from file using rb, and writes the
# appended content of records by reopening the same file in wb mode or
# dumping the content in a new file
OR
Any other equivalent correct code
(i) (½ Mark for opening the file in correct mode)

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

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 24 of 27

Page 26

m
m .co

m .co s e m
se
(½ Mark for inputting the details of the record)
(½ Mark for formation of the tuple or list of the record)
g l a
(½ Mark for correctly dumping the tupe/list) a
(ii) Update() – To increase the Charges of each resource person by 500.
(ii) import pickle
def Update(): #Assuming independent tuples in file
F=open("RESOURCES.DAT","rb+")
try:
while True:
m
Pos=F.tell()
m .co
.co m
Rec=pickle.load(F)
m
Newrec=list(Rec)
s e
s e
Newrec[3]+=500 l a
g l a
F.seek(Pos) ag
a pickle.dump(tuple(Newrec),F)
except:
F.close()
OR
import pickle #Assuming list of tuples in file
def Update():
with open("RESOURCES.DAT","rb+") as F:
Rec = pickle.load(F)
for I in range(len(Rec)):
m
.co
Rec[I]=list(Rec[I])
Rec[I][3]+=500
F.seek(0) e m
pickle.dump(Rec,F)
las
OR
ag
# Also consider a code, which reads from file using rb, and writes the
# updated record by reopening the same file in wb mode or dumping the
# content in a new file
OR
Any other equivalent correct code
(ii) (1 Mark for opening the file in correct modes)
(½ Mark for reading/loading data correctly)
m
.co
(½ Mark for correct iteration)
m
.co m
(½ Mark for incrementing the specified data correctly)

m (½ Mark for writing/dumping modified data)
s e
s e37. a
Sanjeevani is a big group of educational institutions withglits head office in
g la a 5x1

a Hyderabad. It is planning to set up a new University in Amritsar. The Amritsar
University Campus will have four block/buildings – ADMIN, ACADEMIC, HOSTEL,
=5

SPORTS. You, as a network expert, need to suggest the best network – related
solutions for them to resolve the issues/problems mentioned in points (i) to (v),
keeping in mind the distances between various blocks/buildings and other given
parameters.

m .
.co s e m
s em l a
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 25/27 ]

g la
a For more Question Papers, Sample Papers, Notes & Syllabus visit Page 25 of 27

Page 27

Block to Block distances (in Mtrs) :
FROM TO DISTANCE
ADMIN ACADEMIC 60 M
ADMIN HOSTEL 160 M
ADMIN SPORTS 80 M
ACADEMIC HOSTEL 40 M
ACADEMIC SPORTS 120 M
HOSTEL SPORTS 150 M

Distance of Hyderabad Head Office from Amritsar University Campus = 2000 km

Number of computers in each block is as follows :
ADMIN 25
ACADEMIC 600
HOSTEL 120
SPORTS 50

(i) Suggest the most appropriate location of the server inside the Amritsar
University Campus. Justify your choice.
Ans (i) Academic Block as it has the maximum number of computers
OR
Academic Block as it requires minimum cable length
OR
Any other similar answer with valid justification
(1 mark for suggesting a block with valid justification)
(ii) Draw the cable layout to efficiently connect various blocks within the
Amritsar University Campus.
Ans (ii)

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

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 26 of 27

Page 28

m
m .co

m .co s e m
se g l a
a

m
m .co
.co s e m
s emDiagram shown as perORthe Minimum Distances l a
g la ag
a for drawing the correct cable layout)
(1 mark
(iii) Name any two wired media that can be used to connect various computers
of a block inside Amritsar Campus.
Ans (iii) Twisted pair cable, Ethernet cable, Coaxial Cable, Optical Fiber Cable (any
two)
(½ mark each for writing any two correct wired media names)

m
.co
(iv) For the academic purpose, the University will provide its own 24×7 FM
channel within the University Campus. Which communication medium, out
of the following, is used by FM ?
e m
(A) Radio Waves (B) Micro Waves
las
(C) Infrared Waves
Ans (iv) (A) Radio waves ag
(1 Mark for writing the correct option)
(v) (a) The students will be attending a lot of online academic sessions and
workshops. These will involve audio–visual communication. Write the full
name of the protocol which will be used for such a communication
through the internet.
Ans (v) (a) Voice over Internet Protocol
m
m .co
.co
(a) (1 Mark for writing the Voice Over Internet Protocol)
e m
e m
OR
l as
las (½ Mark for writing the VoIP)
ag
ag OR
(b) Where should a repeater be installed in Amritsar University campus to
boost the signal between blocks? Justify your answer.
Ans (b) Between Academic and Sports block because distance is more than
100m.
(1 Mark for writing the correct answer)

m .
.co s e m
s em l a
ag
[ CBSE MS Computer Science Subject Code 083 Paper Code 91 Class 12 Main 2026 Page: 27/27 ]

la
​

​

​

​

​

ag
​

​

​

For more Question Papers, Sample Papers, Notes & Syllabus visit Page 27 of 27

Document Details

Board / OrgCBSE
ExamClass 12
TypeSolution
Pages28
Languageenglish
Updated24 Sep 2026