Page 1
CBSE CLASS 12
PT II Question Paper
Session 2025-26
COMPUTER
SCIENCE
Exam CBSE Class 12
Subject Computer Science
Session 2025-26
Document Type PT II Question Paper
Notes · Sample Papers · Previous Year Papers · Mock Tests
Page 2
m
c m
m. as e
se SECOND UNIT TESTgl
Question Paper
a
SESSION – 2025-2026
CLASS: XII MAXIMUM MARKS: 40
SUBJECT: COMPUTER SCIENCE TIME: 1 Hour 30 Minutes
----------------------------------------------------------------------------------------------------------------
General Instructions:
m
.co
This question paper contains 3 pages and 21 questions.
m
.co m
All questions are compulsory.
The paper is divided into 5 Sections- A, B, C, D and E.
s e
s em
Section A consists of 11 questions (Q No: 1 to 11). Each question carries 1 Mark.
g l a
l a
Section B consists of 5 questions (Q No: 12 to 16). Each question carries 2 Marks.
a
ag
Section C consists of 2 questions (Q No: 17 & 18). Each question carries 3 Marks.
Section D consists of 2 questions (Q No: 19 & 20). Each question carries 4 Marks.
Section E consists of 1 question (Q No: 21). This question carries 5 Marks.
In-case of MCQ, text of the correct answer should also be written.
Section-A (1 x 11=11 Marks)
1. Which function is used to write data to a binary file in Python? 1
a) dump() b) writerow( ) c) write () d) None
m
2. Let the file pointer is at the end of 3rd line in a text file named “data.txt”. Which of the 1
.co
following option can be used to read all the remaining lines?
m
a) f.read( ) b) f.read(all) c) f.readline( ) d) f.readlines( )
s e
a
3. Which Python module is used for serialization of objects in binary files? 1
l
ag
(a) csv b) text c) pickle d) json
4. To cancel the EOL translation in csv file while writing the data _______ parameter is 1
used with open().
a) newline b) next c) open d) EOL
5. Ravi opened the file myfile.txt in append mode. In this file the file object/file handle will 1
be at the __________.
a) beginning of the file b) end of the file
c) second line of the file d) the end of the first line
6. In a stack, if a user tries to remove an element from an empty stack it is called ________. 1
o m
c
a) Underflow b) Empty collection c) Overflow d) Garbage Collection
7. m . LAN
c. o a) Hub e m
A device that connects two or more Local Area Networks to create a single, larger 1
m
e 8. Which device is used to amplify signals over a network?
b) Switch c) Router d) Bridge
l a s
s
la 9. a)Which a g 1
ag Router b) Switch c) Repeater d) Bridge
Protocol is used to send and route email messages across the internet and 1
between servers.
a) TCP b) IP c) POP d) SMTP
Q. No. 10 and Q. No. 11 are Assertion (A) and Reason (R) based questions.
Mark the correct choice as:
a) Both A and R are true and R is the correct explanation of A.
b) Both A and R are true but R is not the correct explanation of A.
c) A is true but R is false.
.co e m
d) A is false but R is true.
em l as
s
1
l a ag
ag For more Question Papers, Sample Papers, Notes & Syllabus visit Page 1 of 3
Page 3
10. Assertion (A): The load() function is used to read data from a binary file created using 1
the pickle module.
Reason (R): The load() function reads the byte stream from the file and converts it
back into a Python object.
11. Assertion (A): In non-circuit switching techniques, the message may take different 1
routes at different times.
Reason (R): The message switching and packet switching techniques are the same.
Section-B (2 x 5=10 Marks)
12. Evaluate the following postfix expression using stack: A B C * + D – 2
where A=4, B=3, C=2 and D=5
13. Differentiate between Circuit switching and Packet switching. 2
14. a.) In tough terrain such as hilly, forested or mountainous areas, radio wave is preferred 2
over micro wave. Support the above statement with relevant points.
b) Expand the following: i) IMAP ii) CDMA
15. Write a function in Python to read a text file, Alpha.txt and displays those lines which 2
begin with the word ‘You’.
16. a) List any two advantages of optical fiber cable in data transmission. 2
b) Differentiate between a web browser and a web server?
Section-C (3 x 2=6 Marks)
17. Write a function to display all records from PATIENT.DAT and also count how many 3
patients have age greater than 60. File contains list records [Id, Name, Age, Disease].
18. Rohit is the exam coordinator of a coaching institute. To keep track of students’ 3
performance records, he has created a CSV file named STU.CSV, which stores the
details of each student.Write a function copyScience() that reads from STU.CSV having
records: Roll, Name, Streamand writes all records with Stream = "Science" to a new
CSV file SCIENCE.CSV.
Section-D ( 4X2=8 Marks)
19. A list contains records of books as 4
L = [("Python", 550), ("Maths", 300), ("Comics", 80), ("Novel", 1200)]
Write the following user-defined functions to perform operations on a stack named
BookStack to:
I.Push_element() – Push an item containing the book name and price of books costing
more than 100 into the stack.
Output:[('Python', 550), ('Maths', 300), ('Novel', 1200)]
II. Pop_element() – Pop the items from the stack and display them. Also, display
"Stack Empty" when there are no elements in the stack.
Output:
('Novel', 1200)
('Maths', 300)
('Python', 550)
Stack Empty
20. i) How are binary files different from text files? 1+3
ii) A binary file EMP.DAT stores records as: [EmpNo, Name, Salary, Dept]
Write a function to:
(a) Display details of employees of department = "HR"
(b) Copy records of employees having Salary > 5,00,000 to HIGH.DAT
2
For more Question Papers, Sample Papers, Notes & Syllabus visit Page 2 of 3
Page 4
m
c m
m. as e
se l
Section-E (5 x 1=5 Marks)
ag
21. Microhard is planning a new campus in Hyderabad while maintaining its headquarters in 5
Bangalore. The campus will have four buildings: Alpha, Beta, Gamma, and Delta. As a
network expert, you are asked with proposing the best network solutions for their needs
based on the following:
From To DISTANCE Numbers of computers
(in meters) in each block
Alpha Beta 50
Alpha Gamma 175 Alpha 60
m
.co
Alpha Delta 90 Beta 40
m
.co
Beta Gamma 60 Gamma 90
e m
s
Beta Delta 70 Delta 35
em l a
Gamma Delta 60
l as ag
ag
i) Suggest the best location for the server in the Hyderabad campus and explain.
ii) Suggest the placement of the following devices: a) Repeater b) Switch
iii) Suggest and draw a cable layout of connections between the buildings inside the
campus.
iv) The organization plans to provide a high-speed link with its head office using a wired
connection. Which of the cables will be most suitable for this job?
v) Which type of network (PAN, LAN, or WAN) will be formed while connecting the
Hyderabad campus to Bangalore Headquarters?
m
.co
*****
e m
l as
ag
m
m .co
m .co s e m
s e g la
g la a
a
.co s e m
s em l a
3
l a ag
ag For more Question Papers, Sample Papers, Notes & Syllabus visit Page 3 of 3