0% found this document useful (0 votes)
16 views17 pages

Model Paper1 Solution

The document is a model question paper for the 2025-26 II PUC examination, consisting of multiple-choice questions, fill-in-the-blanks, and descriptive questions covering topics such as data structures, SQL, and algorithms. It includes sections with varying marks for different types of questions, including applications of stacks, exception handling, and database keys. The paper aims to assess students' understanding of computer science concepts and their practical applications.

Uploaded by

nhema628
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)
16 views17 pages

Model Paper1 Solution

The document is a model question paper for the 2025-26 II PUC examination, consisting of multiple-choice questions, fill-in-the-blanks, and descriptive questions covering topics such as data structures, SQL, and algorithms. It includes sections with varying marks for different types of questions, including applications of stacks, exception handling, and database keys. The paper aims to assess students' understanding of computer science concepts and their practical applications.

Uploaded by

nhema628
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

2025-26 II PUC MODEL QUESTION PAPER- 1

PART-A
I. Answer ALL the questions. Each question carries ONE mark.
Select the correct answer from the choices given.
1. The exception raised when the requested module definition is not found.
(a) io error (b) syntax error (c) import error (d) index error
Ans: (c) import error
2. The method which is used to convert python objects for writing data in a binary file
(a) load() (b) dump( ) (c) seek( ) (d) tell( )
Ans: (b) dump( )
3. Assertion : (A) stack follows LIFO rule.
Reason : (R) Insertion and deletion takes place at same end
(a) A is true and R is correct reason
(b) A is true and R is not correct reason
(c) A is false and R is correct reason
(d) A is false and R is not correct reason
Ans: (a) A is true and R is correct reason
4. Deque is a version of queue which allows insertion and deletion at
(a) front end (b) rear end
(c) both ends (d) not both ends
Ans: (c) both ends
5. In bubble sort while sorting in ascending order, which element reaches its correct
position after the first pass.
a) The smallest element
b) The middle element
c) The largest element
d) The second largest element
Ans: c) The largest element
6. (A) In selection sort the smallest element is selected in each pass and placed in its
correct position.
(B) In selection sort the nth element is the last, and it is already in place
(a) A is true and B is false (b) A is false and B is true
(c) A and B are true (d) A and B are false
Ans: (c) A and B are true
7. The number of attributes in a relation is called
(a) degree (b) cardinality (c) domain (d) tuple
Ans: (a) degree
8. The most popular query language used by RDBMS is
(a) MYSQL (b) PYTHON (c) COBOL (d) JAVA
Ans: (a) MYSQL
9. Which of the following is a string single row built in function
(a) Length ( ) (b) Min ( ) (c) Now ( ) (d) Count ( )
Ans: (a) Length ( )
10. The operation is used to combine the selected rows of two tables at a time.
(a) Union (b) Intersect (c) Minus (d) Product
Ans: (a) Union
11. Correct expansion form of HTTP is :
a) Hyperlink Text Transmit Protocol
b) Hyper Transfer Transmission Protocol
c) Hyper Text Transfer Protocol
d) Hypermedia Text Transmit Protocol
Ans: c) Hyper Text Transfer Protocol
12. The network topology where data can be transmitted in only one direction is
a) Star b) Ring c) Mesh d) Bus
Ans: b) Ring
13. The example for Half duplex communication mode :
a) Radio b) Walkie-Talkie c) Television d) Telephone
Ans: b) Walkie-Talkie
14. The communication protocol which establishes a dedicated and direct connection
between two communicating devices.
a) FTP b) SMTP c) PPP d) TCP
Ans: c) PPP
15. The standalone programs that are capable of working on its own
a) Worm b) Trojan horse c) Ransom ware d) Spy ware
Ans: a) Worm
II. Fill in the blanks choosing the appropriate word/words from those given in
the brackets. (insert, assert, raise, binary, max, record, attribute)
16. The __________ statement in python is used to test an expression in the program
code.
Ans : assert
17. ______ file consists of data stored as a stream of bytes.
Ans: Binary
18. Each row of a table is called _______ .
Ans: record
19. ________ is a command which comes under DML.
Ans: insert
20. ________ is an aggregate function in SQL.
Ans: max( )
PART-B
III. Answer any FOUR questions. Each question carries TWO marks.
21. What is prefix and postfix expression?
Answer:
A prefix expression is a notation where the operator precedes (before) its operand.
Example: infix a+b : prefix : +ab
A postfix expression is a notation where the operator follows(after) its operand.
Example: infix a+b: postfix : ab+
22. Write any two applications of queues in computer science.
Answer: Two applications of queues in computer science are:
1. CPU scheduling that is managing processes waiting for the CPU.
2. Managing print jobs in a printer queue.
23. What is collision situation and collision resolution in hashing?
Answer: A collision situation occurs in Hashing Search when 2 different elements
keys map to the same index in a hash table.
Collision resolution in Hashing is the technique used to deal with such situation for
placing the other elements with the same hash value in the hash table. Some of the
techniques are separate chaining or open addressing.
24. Write the rules which are imposed on an attribute of the relation.
Answer: The rules imposed on an attribute are typically part of integrity constraints
which ensures values are valid for the attribute’s type.
Commonly used SQL constraints are:
1. NOT NULL: Ensures that a column cannot have NULL values.
2. UNIQUE: Ensures that all the values in a column are distinct/ unique.
25. Give the difference between char and varchar data types in SQL.
Answer: CHAR is a fixed-length string data type, it means it always uses the same
amount of storage space regardless of the input length. Length of CHAR data type is
between 0 to 255
VARCHAR is a variable-length string data type, it means storage space occupies as per
the number of characters in the given string. . Length of VARCHAR data type is
between 0 to 65535
26. Mention any two network devices.
Answer: Some of the network devices are:
1. ROUTER
2. REPEATER
3. HUB
4. RJ-45
5. SWITCH
6. ETHERNET CARD
27. Define data and communication.
Answer: Data refers to raw facts, figures and symbols that have no meaning until they
are processed.
Communication is the process of exchanging information, messages between two or
more entities. Communication usually involves a sender, a message, a channel and a
receiver.
PART – C
IV. Answer any FOUR questions. Each question carries THREE marks.
28. What is the need for exception handling?
Answer: Exception handling refers to the process of responding to the occurrence of
exceptions during the execution of a program. If do not handle exceptions, then the
program may crash and terminates abnormally. This is typically done using try, except,
finally, and else blocks in Python.
Need for Exception Handling:- Essential to prevent program crashes by capturing and
managing runtime errors.-
1. Separates main program logic from error detection and correction code
2. The compiler/interpreter tracks the exact error location.
3. Applicable to both user-defined and built-in exceptions.
29. Explain any three file opening modes in data file handling.
Answer:-
File Access Modes with Examples
1. Read Mode:- r
• Opens file for reading only.
• File must exist.
• File pointer at the beginning.
f = open("[Link]", "r")
2. Binary Read Mode: - rb
• Opens file in binary mode for reading.
f = open("[Link]", "rb")
3. Read and Write Mode:- r+
• Opens file for reading and writing.
• File must exist.
f = open("[Link]", "r+")
4. Write Mode: - w
• Opens file for writing only.
• Overwrites file if it exists or creates a new one.
f = open("[Link]", "w")
5. Write Binary and Read Mode: - wb+
• Opens file in binary mode for writing and reading.
• Overwrites or creates a new file.
f = open("[Link]", "wb+")
6. Append Mode: - a
• Opens file for appending data.
• Creates file if it doesn’t exist.
• File pointer at the end.
f = open("[Link]", "a")
7. Append and Read Mode: - a+
• Opens file for both appending and reading.
f = open("[Link]", "a+")
Example from textbook:
myObject = open("[Link]", "a+")
30. Define:
a) Time Complexity
b) Constant time algorithm
c) Linear time algorithm
d) Quadratic time algorithm
Answer: -
a) Time Complexity:
Time complexity is the amount of time an algorithm takes to complete based
on input size. In Bubble, Selection, and Insertion Sort, all three have nested
loops, hence their worst-case time com plexity is O(n²). Insertion Sort,
however, can have a best-case complexity of O(n) if the list is already nearly
sorted.
b) Constant time algorithm :- denoted as O(1) in Big O notation, is an
algorithm where the execution time remains the same regardless of the input
size. This means that whether the algorithm processes one element or a
million elements, the time it takes to complete is a fixed amount.
c) Linear time algorithm:- It is an algorithm whose execution time increases in
direct proportion to the size of its input. In Big O notation, this is represented
as O(n), where 'n' is the size of the input data.
d) Quadratic time algorithm :- It is one whose running time or computational
steps grow proportionally to the square of the input size (n), denoted in Big O
notation as O(n2).
31. Write an algorithm to search an element using linear search method.
Answer:
Algorithm: LinearSearch(numList, key, n)
Step1: Set index=0
Step2: while index<n, Repeat step3
Step3: if numList[index]==key then
Print “Key element found at Position”, index+1
Stop
Else
Index=index+1
Step4: Print “ Search Unsuccessful”
32. Briefly explain database schema, data constraint and data manipulation.
Answer:
1. Database Schema: -
The database schema is also called the logical view or the structure or the
design of a database. It describes how the data are organized in a database. It
is typically the skeleton of the database that represents the structure of table,
table name, columns/attributes of the table, the type of data each column of
the table can hold, the relationships among the tables.
2. Data Constraints: -
In DBMS, constraints refer to limitations or restrictions placed on data being
entered in a database table. This indicates that only a particular type of data
may be entered into the database or that only a particular sort of operation can
be performed on the data inside.
Constraints ensures data accuracy, data consistency, and data integrity in a
database management system (DBMS).
3. Data Manipulation: -
It is the process of altering or modifying the data stored in a database.
Modification of database consist of 3 operations, that is insertion, deletion and
updation.
33. Explain different math single row functions used in SQL.
Answer: - Numeric / Math Functions:
There are 3 commonly used numeric functions.
1. POWER( ) / POW(X,Y):
It is use to calculate X to the power Y value.
Example:
SELECT POWER(2,3);

2. ROUND(N,D):
It is use to round off number N to D number of decimal places.
If D-0, then it rounds off the number to the nearest integer.
Example:
SELECT ROUND(283.2);
Output: 283

3. MOD(A,B):
It is use to find the remainder after dividing number A by B.
Example:
SELECT MOD(21,2);
34. Write a note on local area network.
Answer: - It is a network that connects computers, mobile phones, tablet, mouse,
printer, etc., placed at a limited distance. The geographical area covered by a LAN can
range from a single room, a floor, an office having one or more buildings in the same
premise, laboratory, a school, college, or university campus. The connectivity is done
by means of wires, Ethernet cables, fibre optics, or Wi-Fi.
LAN is comparatively secure as only authentic users in the network can access
other computers or shared resources. Users can print documents using a connected
printer, upload/download documents and software to and from the local server. Such
LANs provide the short range communication with the high speed data transfer rates.
These types of networks can be extended up to 1 km. Data transfer in LAN is quite
high, and usually varies from 10 Mbps (called Ethernet) to 1000 Mbps (called Gigabit
Ethernet), where Mbps stands for Megabits per second. Ethernet is a set of rules that
decides how computers and other devices connect with each other through cables in a
LAN.
PART – D
V. Answer any FOUR questions. Each question carries FIVE marks.
35. Write the applications of stacks in programming.
Answer: - Some applications of stack in programming are:
1. It is used in reversing a word.
2. It is useful in “undo” mechanism in text editor.
3. Conversion of decimal number to binary number.
4. Conversion of infix expression into prefix and postfix expression.
5. It is used in recursion technique.
6. Checking for balanced parenthesis / brackets matching.
7. It is use while browsing a website, and moving from current web page to
previous web page.
36. Write an algorithm to check whether a string is palindrome or not using
deque.
Answer: -
Algotithm: Palindrome( )
Step1: Initialize a deque: Create an empty deque data structure (a double-ended
queue)
Step2: Normalize the input string: Convert the string to lowercase and remove any
non-alphanumeric characters (such as spaces or punctuation) to ensure an accurate
check for palindromes.
Step3: Populate the deque: Iterate through the normalized string and add each
character to the rear of the deque.
Step4:Compare characters from both ends: While the deque has more than one
character remaining:
1. Remove a character from the front of the deque.
2. Remove a character from the rear of the deque.
3. If the two characters do not match, the string is not a palindrome,
and can return FALSE .
Step5 : Determine the result: If the loop completes without finding any non-
matching characters, it means the string is a palindrome, and can return True .

37. Briefly explain the working of binary search algorithm.


Answer: - Binary search is a fast search algorithm with run-time complexity of (log n).
This search algorithm works on the principle of divide and conquer, since it divides the
list into half before searching. For this algorithm to work properly, the data collection
should be in the sorted form.
Binary search looks for a particular key value by comparing the middle most item of the
collection. If a match occurs, then the index of item is returned. But if the middle item
has a value greater than the key value, the right sub-list of the middle item is searched.
Otherwise, the left sub-list is searched. This process continues recursively until the size
of a sub-list reduces to zero.
Algorithm: Binarysearch(numList, key)
Step1: set first = 0, last=n-1
Step2: while first<=last Repeat step 3
Step3: mid=(first+last)//2
if numList[mid]=key
print “Key Element found at position”,mid+1
Stop
else
if ley>numList[mid] then
first=mid+1
else
last=mid – 1
Step4: print “Search unsuccessful”
38. What is a key in relational database? Explain types of keys.
Answer: - Keys in a Relational DataBase
In a Database Management System (DBMS), a key is a field or a set of
fields that uniquely identifies a record (or row) within a table. Keys are essential for
managing and organizing data, establishing relationships between tables, and ensuring
data integrity. They allow for efficient data retrieval and manipulation.
There are different types of keys
1. Primary Key
2. Candidate Key
3. Composite Primary Key
4. Foreign Key
Primary Key:
A primary key in a database management system (DBMS) is a column or a set of
columns that uniquely identifies each row in a table. It ensures data integrity by
preventing duplicate or null values in the specified column(s).
Candidate Key:
A relation can have one or more attributes that takes distinct values. Any of these
attributes can be used to uniquely identify the tuples in the relation. Such attributes are
called candidate keys. A table can have multiple candidate keys, but only one is
typically selected as the primary key.
Composite Primary Key:
It is a primary key that is made up of two or more columns, as opposed to a
single column. It ensures that each row in a table can be uniquely identified by a
combination of values from those columns.
For Example:
In a relation called attendance, roll number cannot be used a primary key as roll
number of same student will appear in another row for a different date. Similarly,
attendance date cannot be used as primary key because same date is repeated for each
roll number. However, combination of these two attributes rollnumber and attendance
date together would always have a unique value in attendance table.
Foreign Key:
A foreign key is used to represent the relationship between two relations. A
foreign key in a database management system (DBMS) is a column or set of columns in
one table that refers to the primary key of another table. It establishes a link between
data in different tables, maintaining referential integrity by ensuring that values in the
foreign key column exist in the referenced primary key column.
39. Define network topology? Explain star and bus topologies.
Answer: - Network Topologies
The arrangement of computers and other peripherals in a network is called
network topology. Some of the factors that affect choice of topology for a network are
1. Cost
2. Flexibility
3. Reliability
4. Scalability
5. Ease of installation
6. Ease of maintenance
1. Bus Topology
Bus Topology is a network type in which every computer and network device is
connected to a single cable. It is bi-directional. It is a multi-point connection and a non-
robust topology because if the backbone fails the topology crashes. A common example
of bus topology is the Ethernet LAN, where all devices are connected to a single coaxial
cable or twisted pair cable. This topology is also used in cable television networks.

Advantages of Bus Topology


 If N devices are connected to each other in a bus topology, then the number of
cables required to connect them is 1, known as backbone cable, and N drop lines
are required.
 Coaxial or twisted pair cables are mainly used in bus-based networks that support
up to 10 Mbps.
 The cost of the cable is less compared to other topologies, but it is used to build
small networks.
Disadvantages of Bus Topology
 A bus topology is quite simpler, but still, it requires a lot of cabling.
 If the common cable fails, then the whole system will crash down.
 If the network traffic is heavy, it increases collisions in the network.
 Adding new devices to the network would slow down networks.
 Security is very low.
2. Star Topology
In Star Topology, all the devices are connected to a single hub through a cable. This
hub is the central node and all other nodes are connected to the central node. The hub
can be passive in nature i.e., not an intelligent hub such as broadcasting devices, at the
same time the hub can be intelligent known as an active hub. Active hubs have
repeaters in them. Coaxial cables or RJ-45 cables are used to connect the computers.

Advantages of Star Topology


 If N devices are connected to each other in a star topology, then the number of
cables required to connect them is N. So, it is easy to set up.
 Each device requires only 1 port i.e. to connect to the hub, therefore the total
number of ports required is N.
 It is Robust. If one link fails only that link will affect and not other than that.
 Easy to fault identification and fault isolation.
 Star topology is cost-effective as it uses inexpensive coaxial cable.
Disadvantages of Star Topology
 If the concentrator (hub) on which the whole topology relies fails, the whole
system will crash down.
 The cost of installation is high.
 Performance is based on the single concentrator i.e. hub.
40. Write the properties of radio waves transmission.
Answer: - The properties of Radio Waves Transmissions are:
1. Waves of frequency range 3KHz – 1 GHz
2. Omni-directional, these waves can move in all directions.
3. Radio waves of frequency 300KHz – 30 MHz can travel long distance.
4. Susceptible (exposed / easily affected) to interference.
5. Radio waves of frequency 3-300KHz can penetrate walls
6. These waves are used in AM and FM radio, television, cordless phones.
41. Explain the methods of malware identification used by antivirus.
Answer: - The different methods of malware identification used by antivirus
software are as follows:
1. Signature-based detection — In this method, an antivirus works with the help
of a signature database known as "Virus Definition File (VDF)". This file
consists of virus signatures and is updated continuously on a real-time basis. This
makes the regular update of the antivirus software a must.
2. Sandbox detection — In this method, a new application or file is executed in a
virtual environment (sandbox) and its behavioral fingerprint is observed for a
possible malware. Depending on its behavior, the antivirus engine determines if it
is a potential threat or not and proceeds accordingly.
3. Data mining techniques — This method employs various data mining and
machine learning techniques to classify the behavior of a file as either benign or
malicious.
4. Heuristics — Often, a malware infection follows a certain pattern. Here, the
source code of a suspected program is compared to viruses that are already
known and are in the heuristic database. If the majority of the source code
matches with any code in the heuristic database, the code is flagged as a possible
threat.
5. Real-time protection — Some malware remains dormant or gets activated after
some time. Such malware needs to be checked on a real-time basis. In this
technique, the anti-malware software keeps running in the background and
observes the behavior of an application or file for any suspicious activity while it
is being executed i.e. when it resides in the active (main) memory of the
computer system.
PART – E
VI. Answer any TWO questions. Each question carries FIVE marks.

42. Write the process to sort the following elements using insertion sort method.
80, 60, 20, 40, 50, 10
Solution:-
a) ALTER TABLE student ADD Primary Key (StuReg);
b) SELECT AVG(Marks) FROM student;
c) UPDATE student SET Marks=Marks+5 WHERE StuReg=’Stu_001’;
d) SELECT * FROM Student ORDER BY Marks DESC;
e) DELETE FROM Student WHERE Marks<93;

You might also like