Page 1
FOR HARYANA CLASS 12 PREPARATION
HBSE Class 12 Sample
Paper 2027 Computer
Science Marking
Scheme
EXAM YEAR TYPE SUBJECT
Haryana Class 12 2027 Answer Key Computer Science
Notes · Sample Papers · Previous Year Papers · Mock Tests
Page 2
m
m .co
.co
Note: Apart from the marking instructions, a teacher can evaluate at his
e m
m
discretion.
as
se नोट: अंकन नन्ቖे शों के अलावा, एक नश्ቌक अपने नववेकानुसार मूल्ां कन कर सकता है ।
Marking Scheme-12th COMPUTER SCIENCE (CPU) ag l
Model Question Paper 2026-27
(2026-27)
(SUBJECT CODE: 906)
Maximum Marks: 40 Time: 2:30 hours
General Instructions:
i. This question paper is divided into 4 Sections - A, B and C and D.
ii. Section A consists of 1 question (10 parts -Objective Type of 1 mark each).
m
iii.
m
Section B consists of 4 questions (2-5). Each question carries 1 mark.
.co
iv.
.co
Section C consists of 7 questions (6-12). Each question carries 2 marks.
m s e m
v.
e
Section D consists of 3 questions (13-15). Each question carries 4 marks.
s l a
g l a SECTION A
ag
1(i) a (Each part of the question carries 1 Mark)
Which device regenerates weak signals in a network? 1
a) Hub
b) Repeater
c) Switch
d) Gateway
Ans b) Repeater
1 Mark for correct identification.
m
1(ii)
m .co
Which malware secretly collects user information? 1
a) Spyware
s e
b) Firewall
g la
c) Router
d) Modem a
Ans a) Spyware
1 Mark for correct identification.
1(iii) Which clause is executed when no exception occurs in a try block? 1
a) except
b) raise
c) else
m
.co
d) finally
m
.co em
Ans c) else
e m 1(iv) 1 Mark for correct identification. s
lain a table?
las a g
Which SQL command is used to modify existing records 1
ag a) INSERT
b) UPDATE
c) SELECT
d) CREATE
Ans b) UPDATE
1 Mark for correct identification.
1(v) __________ topology connects every node to every other node 1
Ans Mesh
m .
.co
1 Mark for writing correct topology.
s e m
s em l a
g la ag
a For more Question Papers, Sample Papers, Notes & Syllabus visit Page 1 of 10
Page 3
1(vi) __________ is the protocol used for transferring files over a network 1
Ans FTP or File Transfer Protocol
1 Mark for writing the correct type of protocol.
Note: Do not deduct mark for any spelling mistakes.
1(vii) Bluetooth is a wired communication technology. (True/False) 1
Ans False
1 Mark for correct identification.
1(viii) Queue follows the LIFO principle. (True/False) 1
Ans False
1 Mark for correct identification.
Direction: In the questions given below, there are two statements
marked as Assertion (A) and Reason (R). Choose the correct
option out of the choices given below in each question:
1(ix) Assertion (A): A stack follows the LIFO (Last In, First Out) principle. 1
Reason (R): In a stack, the element inserted first is always removed
first.
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.
d) (A) is false, but (R) is true.
Ans c) (A) is true, but (R) is false.
1 Mark for correct identification.
1(x) Assertion (A): Cookies are used by websites to store user-related 1
information.
Reason (R): Cookies are antivirus programs that remove malware from
a computer
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.
d) (A) is false, but (R) is true.
Ans c) (A) is true, but (R) is false.
1 Mark for correct identification.
SECTION B
(Each question carries 1 mark)
2. What is the purpose of the finally clause in exception handling? 1
Ans What is the purpose of the finally clause in exception handling?
For more Question Papers, Sample Papers, Notes & Syllabus visit Page 2 of 10
Page 4
m
m .co
.co
The finally clause contains code that is executed whether an
m s em
exception occurs or not. It is generally used for cleanup tasks such
se g la
a
as closing files or releasing resources.
1 marks for any correct purpose of the finally clause.
3. What is the use of the DELETE command in SQL? 1
Ans The DELETE command is used to remove one or more records from
a table.
1 Mark for correct usage of DELETE Command.
4. What is stack in data structure? 1
m
.co
Ans A stack is a linear data structure that follows the LIFO (Last In, First
m
.co m
Out) principle, where the last item added is the first to be removed.
s e
em a
1 mark for any correct definition of Stack.
s l
5.
g la Write the full form of PAN? ag1
aAns Personal Area Network
1 mark for correct full form.
OR
What is Computer Network?
Ans Two or more computers connected to share resources is called a
computer network.
m
.co
1 mark for any correct definition of computer network.
m
s eSECTION C
g a
(Eachlquestion carries 2 marks)
6. a
Case Study Question: 2
Neha receives many unwanted pop-up advertisements while
browsing the internet.
(i) Which type of malware is commonly responsible for such
advertisements?
a) Worm
m
.co
b) Adware
m
.co
c) Trojan
e m
s
d) Firewall
e m l a
las Ans b) Adware
1 Mark for correct identification. ag
ag (ii) Which software helps protect a system from malware?
a) Antivirus
b) Compiler
c) Interpreter
d) Assembler
a) Antivirus
1 Mark for correct identification.
m .
.co e m
7. Differentiate between Hackers and Crackers. 2
Ans
em
Differences between Hackers and Crackers:
l as
las ag
ag For more Question Papers, Sample Papers, Notes & Syllabus visit Page 3 of 10
Page 5
Hackers
Access systems to identify and fix security weaknesses.
Usually work ethically and legally.
Improve security.
Crackers
Damage or misuse systems and data.
Work illegally and unethically.
Access systems illegally for malicious purposes.
1 mark each for any correct difference between the two. (Max 2
differences)
8. Describe any two SQL aggregate functions with examples. 2
Ans SQL Aggregate Functions
SUM(): Calculates the total sum of a numeric column.
Example:
SELECT SUM(Salary) FROM Employees;
This query calculates the total salary of all employees.
COUNT(): Counts the number of rows in a column or table.
Example:
SELECT COUNT(*) FROM Employees;
This query counts the total number of employees in the table.
AVG(): Calculates the average value of a numeric column.
Example:
SELECT AVG(Salary) FROM Employees;
This query calculates the average salary of employees.
MIN(): Finds the minimum value in a column.
Example:
SELECT MIN(Salary) FROM Employees;
This query finds the lowest salary among employees.
MAX(): Finds the maximum value in a column.
Example:
SELECT MAX(Salary) FROM Employees;
This query finds the highest salary among employees.
½ marks for any correct aggregate functions name.
½ marks for correct definition of the above functions.
1 mark for correct example of the respective functions stated
above (1/2 marks each).
Do not deduct marks for any spelling mistakes.
OR
Write an SQL statement to create an EMPLOYEE table with EmpID,
EmpName, and Salary where EmpID is the Primary Key.
Ans
For more Question Papers, Sample Papers, Notes & Syllabus visit Page 4 of 10
Page 6
m
m .co
.co
CREATE TABLE EMPLOYEE
(
e m
m as
se l
EmpID VARCHAR(10) PRIMARY KEY,
EmpName VARCHAR(50),
Salary DECIMAL(10,2) ag
);
2 marks for correct SQL query with correct syntax.
Deduct ½ mars for each syntax error.
9. What is the difference between a text file and a binary file? 2
Ans Text File
Stores data in readable text format.
Human-readable.
m
m
Extension examples: .txt, .csv
.co
.co s e m
s em Stores
Binary File
l a
l a data in binary format (0s and 1s).
ag
ag Not human-readable.
Extension examples: .dat, .bin
1 mark each for any correct difference between the two. (Max 2
differences)
10. Explain any two network topologies. 2
Ans Different types of network topologies:
1. Bus Topology: All devices are connected to a single central
m
cable (the bus). Data sent by one device is accessible to all
.co
devices on the network. It’s easy to implement but can be
m
e
inefficient with many devices.
las
2. Star Topology: All devices are connected to a central hub
ag
or switch. Data travels through the hub to reach the
destination device. It is easy to manage and scale, but if the
hub fails, the entire network is affected.
3. Ring Topology: Devices are connected in a circular fashion,
and data travels in one direction around the ring. Each
device has exactly two neighbors. It provides efficient data
transfer, but a failure in any device can disrupt the whole
network.
m
.co
4. Mesh Topology: Every device is connected to every other
m
.co m
device. This provides high redundancy and reliability, as
m multiple paths exist for data to travel. However, it requires
s e
s e more cabling and can be complex to manage.
g l a
g la 5. Hybrid Topology: A combination of two or more different a
a types of topologies (e.g., star and bus). This can take
advantage of the strengths of different topologies to suit
specific network requirements.
6. Tree Topology: A variation of the star topology, where
groups of star-configured networks are connected to a
central bus or backbone. This structure is scalable and
hierarchical, making it suitable for large networks.
m .
.co
½ marks each for naming any correct network topology.
e m
s
½ marks each for any correct definition of respective topology.
s em l a
g la ag
a For more Question Papers, Sample Papers, Notes & Syllabus visit Page 5 of 10
Page 7
Full marks to draw diagrams with details even without explanation.
11. What is the need of exception handling? 2
Ans Exception handling prevents a program from terminating
unexpectedly when an error occurs. It allows the program to
handle errors gracefully and continue execution.
2 marks for any correct explanation of need of the exception
handling.
OR
Write the file mode in python that will be used for opening the
following files.
a) A text file "salary.txt" in both read and write mode.
b) A binary file "ecode.dat" in write mode.
Ans a) A text file "salary.txt" in both read and write mode:
File mode: 'r+'
b) A binary file "ecode.dat" in write mode:
File mode: 'wb'
1 Mark each for writing correct file modes.
12. Case Study Question: 2
Arjun downloads a file at a speed of 2 Mbps.
(i) What does Mbps stand for?
a) Mega Bytes per second
b) Mega Bits per second
c) Mega Binary per second
d) Mega Bandwidth per second
Ans b) Mega Bits per second
1 Mark each for correct identification.
(ii) Which speed is higher?
a) 512 Kbps
b) 1 Mbps
c) 2 Mbps
d) 256 Kbps
Ans c) 2 Mbps
1 Mark each for correct identification.
SECTION D
(Each question carries 4 Mark)
13. Write a Python program to implement a stack. 4
stack = []
Ans
# Push operation
stack.append(10)
stack.append(20)
stack.append(30)
print("Stack:", stack)
# Pop operation
item = stack.pop()
print("Popped Item:", item)
print("Updated Stack:", stack)
For more Question Papers, Sample Papers, Notes & Syllabus visit Page 6 of 10
Page 8
m
m .co
.co
2 Marks for PUSH (Inserting) element operation in stack in any
e m
m
program.
as
se 2 Marks for POP (Deleting) element operation in queue in any
program. ag l
Deduct ½ marks if there is any syntax error while writing program.
Give 1 mark if only diagrams or example is given.
OR
Explain the concept of selection sort with an example.
Bubble Sort
Bubble Sort is a simple sorting technique used to arrange elements
in ascending or descending order. It works by repeatedly
m
m
comparing two adjacent elements and swapping them if they are
.co
.co
in the wrong order. This process continues until the entire list
s e m
s em
becomes sorted.
g l a
l a a
ag It"bubbles
is called Bubble Sort because after each pass, the largest element
up" to its correct position at the end of the list.
Steps of Bubble Sort
1. Compare the first two elements.
2. If the first element is greater than the second, swap them.
3. Move to the next pair of adjacent elements and repeat the
process.
4. After one complete pass, the largest element reaches its
m
.co
correct position.
m
5. Repeat the passes until no more swaps are needed.
e
las
Example
Sort the list: 5, 3, 8, a
1
g
Pass 1
Compare 5 and 3 → Swap → 3, 5, 8, 1
Compare 5 and 8 → No swap → 3, 5, 8, 1
Compare 8 and 1 → Swap → 3, 5, 1, 8
m
.co
Array after Pass 1: 3, 5, 1, 8
m
m .co Pass 2
s e m
s e g l a
g la Compare 3 and 5 → No swap → 3, 5, 1, 8 a
a Compare 5 and 1 → Swap → 3, 1, 5, 8
Compare 5 and 8 → No swap → 3, 1, 5, 8
Array after Pass 2: 3, 1, 5, 8
Pass 3
m
Compare 3 and 1 → Swap → 1, 3, 5, 8
.
.co
Compare 3 and 5 → No swap → 1, 3, 5, 8
s e m
s em l a
g la ag
a For more Question Papers, Sample Papers, Notes & Syllabus visit Page 7 of 10
Page 9
Array after Pass 3: 1, 3, 5, 8
Sorted Array: 1, 3, 5, 8
1 mark for any correct definition of bubble sort.
3 marks for correctly explaining the concept of bubble sort with
example.
Deduct 1/2 marks for each mistake in any step/pass.
Do not deduct any marks if explained correctly and no definition is
given.
14. What is a Database? Explain the following: 4
i) Primary Key
ii) Foreign Key
iii) Candidate Key
Ans Database
A database is an organized collection of related data.
i) Primary Key
A field that uniquely identifies each record.
ii) Foreign Key
A field that links one table with another table.
iii) Candidate Key
An attribute that can uniquely identify a record and may become a
primary key.
1 mark for any correct definition of Database.
1 mark each for any correct explanation of Primary, Foreign and
Candidate keys.
½ marks each if only example is given for these terms without their
definitions.
Ignore any spelling mistakes in Hindi as well as in English if the
meaning of the word is understood.
OR
Consider the following table EMPLOYEE:
EmpID Name Salary
E01 Ravi 25000
E02 Neha 30000
E03 Aman 28000
a) Identify the Primary Key.
b) Write an SQL query to display all records.
c) What is the degree of the table?
d) What is the cardinality of the table?
Ans a) Primary Key : EmpID
b) SQL Query
SELECT * FROM EMPLOYEE;
For more Question Papers, Sample Papers, Notes & Syllabus visit Page 8 of 10
Page 10
m
m .co
.co
c) Degree: 3
e m
m
(Columns: EmpID, Name, Salary)
as
se d) Cardinality :3 ag l
(Records/Rows = 3)
1 mark each for each correct answer.
15. What is Bandwidth? Explain the relationship between Bandwidth 4
and Data Transfer Rate (DTR). Also explain the units bps, Kbps,
Mbps, Gbps and Tbps.
Ans Bandwidth is the maximum amount of data that can be
transmitted over a network in a given time.
m
m .co
.co
Relationship between Bandwidth and DTR:
m s e m
s e
Higher bandwidth allows more data to be transmitted per second.
l a
g l a Therefore, Data Transfer Rate (DTR) generally increases as
ag
a bandwidth increases.
Different Units of Data Transfer Rate:
1. bps (bits per second):
The basic unit of data transfer rate, representing one bit of
data transferred per second. A speed of 100 bps means 100
bits of data are transferred per second.
2. Kbps (kilobits per second):
m
.co
1 Kbps equals 1,000 bits per second. It is used for lower
data transfer rates.
e m
la
3. Mbps (megabits per second):s
ag
1 Mbps equals 1,000,000 bits per second. It is commonly
used for broadband and high-speed internet connections.
4. Gbps (gigabits per second):
1 Gbps equals 1,000,000,000 bits per second. It is used in
high-performance networks such as fiber optics.
5. Tbps (terabits per second):
1 Tbps equals 1,000,000,000,000 bits per second. It is
typically used in large-scale data centers and advanced
m
.co
network infrastructure.
m
.co
Effect of Increasing Bandwidth on DTR: When the bandwidth of
e m
e m
a network is increased, the data transfer rate (DTR) also
l as
las increases.
ag
g
1 mark for any correct definition of Bandwidth.
a ½ marks for the relation between bandwidth and DTR.
½ marks each for any correct explanation of all types of DTR Units.
OR
Write short note on the following:
a) SMTP
b) FTP
c) HTTP
d) IP
m .
.co s e m
s em l a
g la ag
a For more Question Papers, Sample Papers, Notes & Syllabus visit Page 9 of 10
Page 11
a) SMTP (Simple Mail Transfer Protocol)
SMTP is a communication protocol used for sending emails over
the Internet. It transfers email messages from the sender's mail
server to the receiver's mail server. SMTP works on the client-
server model and is mainly used for outgoing emails.
Example: When you send an email using Gmail, SMTP is used to
deliver the message to the recipient's mail server.
b) FTP (File Transfer Protocol)
FTP is a standard protocol used to transfer files between
computers over a network. It allows users to upload, download,
rename, and delete files from a remote server. FTP is commonly
used for website maintenance and file sharing.
Example: A web developer uploads website files from a computer
to a web server using FTP.
c) HTTP (Hypertext Transfer Protocol)
HTTP is the protocol used for transferring web pages and other
resources on the World Wide Web. It enables communication
between a web browser and a web server. When a user enters a
website address, HTTP requests the web page from the server and
displays it in the browser.
Example: Opening a website such as a news or educational site
uses HTTP to load the web page.
d) IP (Internet Protocol)
IP is a protocol responsible for identifying devices and routing data
packets across networks. Every device connected to the Internet is
assigned an IP address. IP ensures that data reaches the correct
destination by using these addresses.
Example: When a user visits a website, IP helps route the data
between the user's device and the web server.
1 mark for any correct explanation of SMTP.
1 mark for any correct explanation of FTP.
1 mark for any correct explanation of HTTP.
1 mark for any correct explanation of IP.
NOTE: Give ½ marks each only if full form is only given without
definition for SMTP, FTP, HTTP and IP.
For more Question Papers, Sample Papers, Notes & Syllabus visit Page 10 of 10