Commerce (English Medium)
Science (English Medium)
Arts (English Medium)
Academic Year: 2025-2026
Date & Time: 25th March 2026, 10:30 am
Duration: 3h
Advertisements
General Instructions:
- This question paper contains 37 questions.
- All questions are compulsory. However, internal choices have been provided in some questions. Attempt only one of the choices in such questions.
- The paper is divided into 5 Sections – A, B, C, D and E.
- Section A consists of 21 questions (1 to 21). Each question carries 1 mark.
- Section B consists of 7 questions (22 to 28). Each question carries 2 marks.
- Section C consists of 3 questions (29 to 31). Each question carries 3 marks.
- Section D consists of 4 questions (32 to 35). Each question carries 4 marks.
- Section E consists of 2 questions (36 & 37). Each question carries 5 marks.
- All programming questions are to be answered using Python Language only.
- In case of MCQs, text of the correct answer should also be written.
State True or False:
In Python, data type of 74 is same as the data type of 74.0.
Chapter:
Identify the output of the following code snippet:
8 = “the Truth”
print(s.capitalize())
The truth
THE TRUTH
The Truth
the Truth
Chapter:
Which of the following expressions in Python evaluates to True?
2>3 and 2<3
3>1 and 2
3>1 and 3>2
3>1 and 3<2
Chapter:
What is the output of the following code snippet?
s=‘War and Peace by Leo Tolstoy’
print(s.partition(“by”))
('War and Peace ', 'by', ' Leo Tolstoy')
['War and Peace ', 'by', ' Leo Tolstoy']
('War and Peace ', ' Leo Tolstoy')
['War and Peace ', ' Leo Tolstoy']
Chapter:
What will be the output of the following statement?
print(“PythonProgram”[−1:2:−2])
Chapter:
What will be the output of the following code snippet?
t = tuple('tuple')
t2 = t[2],
t += t2
print(t)
(‘tuple’)
(‘tuple’,‘p’)
(‘t’, ‘u’, ‘p’, ‘1’, ‘e’, ‘p’)
(‘t’, ‘u’, ‘p’, ‘1’, ‘e’)
Chapter:
Which of the following statements is true about dictionaries in Python?
A dictionary is an example of sequence data type.
A dictionary cannot have two elements with same key.
A dictionary cannot have two elements with same value.
The key and value of an element cannot be the same.
Chapter:
If L is a list with 6 elements, then which of the following statements will raise an exception?
L.pop (1)
L.pop (6)
L.insert(1,6)
L.insert(6,1)
Chapter:
What will be the output of the following code?
def f1(a,b=1):
print(a+b,end='-')
c=f1(1,2)
print(c,sep='*')
3−2
3−2*
3−None
3*None
Chapter:
Consider the statement given below:
f1 = open(“pqr.dat”,“______”)
Which of the following is the correct file mode to open the file in read only mode?
a
rb
r+
rb+
Chapter:
State whether the following statement is True or False:
In Python, Logical errors can be handled using try...except...finally statement.
Chapter:
A table has two candidate keys, one of which is chosen as the primary key. How many alternate keys does this table have?
0
1
2
3
Chapter:
Which of the following SQL command can change the degree of the existing relation?
DROP TABLE
ALTER TABLE
UPDATE...SET
DELETE
Chapter:
What will be the output of the query?
SELECT MACHINE ID, MACHINE NAME FROM INVENTORY WHERE QUANTITY <= 100;
All columns of INVENTORY table with quantity greater than 100.
ID and name of machines with quantity less than 100 from INVENTORY table.
All columns of INVENTORY table with quantity greater than or equal to 100.
ID and name of machines with quantity less than or equal to 100 from INVENTORY table.
Chapter:
A relation in MySQL database consists of 2 tuples and 3 attributes. If 2 attributes are deleted and 4 tuples are added, what will be the cardinality of the relation?
4
5
6
7
Chapter:
Which aggregate function in SQL returns the smallest value from a column in a table?
MIN()
MAX()
SMALL()
LOWER()
Chapter:
Advertisements
With respect to computer networks, which of the following is the correct expanded form of RJ 45?
Radio Jockey 45
Registered Jockey 45
Radio Jack 45
Registered Jack 45
Chapter:
Which network device serves as the entry and exit point of a network, a all data coming in or going out of a network must first pass through it in order to use routing paths?
Modem
Gateway
Switch
Repeater
Chapter:
Assertion (A): [1,2,3]+‘123’ is an invalid expression in Python.
Both Assertion (A) and Reason (R) are true and Reason (R) is the correct explanation for Assertion (A).
Both Assertion (A) and Reason (R) are true and Reason (R) is not the correct explanation for Assertion (A).
Assertion (A) is true, but Reason (R) is false.
Assertion (A) is false, but Reason (R) is true.
Chapter:
Assertion (A): The PRIMARY KEY constraint in SQL ensures that each value in the column(s) is unique and cannot be NULL.
Reason (R): Candidate keys are not eligible to become a primary key.
Both Assertion (A) and Reason (R) are true and Reason (R) is the correct explanation for Assertion (A).
Both Assertion (A) and Reason (R) are true and Reason (R) is not the correct explanation for Assertion (A).
Assertion (A) is true, but Reason (R) is false.
Assertion (A) is false, but Reason (R) is true.
Chapter:
What is the difference between default Parameters and positional parameters in Python?
Chapter:
Give an example of a function header which uses both.
Chapter:
Write a Python statement to perform the following tasks: (USE BUILT-IN FUNCTIONS/METHODS ONLY)
To create a new list L1 containing the elements of list L arranged in ascending order, without modifying list L.
Chapter:
Write a Python statement to perform the following tasks: (USE BUILT-IN FUNCTIONS/METHODS ONLY)
A statement to check whether the given character, ch is an alphabet or a number.
Chapter:
Assuming that D1 is a dictionary in Python.
Write a Python expression to check if the key, ‘RNo’ is present in D1.
Chapter:
Assuming that D1 is a dictionary in Python.
Write a Python expression to check if any key in D1 has a value 12.
Chapter:
Assuming that D1 is a dictionary in Python.
Write a single statement using a BUILT_IN function to add the key:
value pair ‘RNo’: 12, if the key ‘RNo’ is not present in D1. However, if the key ‘RNo’ is present, the function should return its value.
Chapter:
Assuming that D1 is a dictionary in Python.
Write a single statement to delete all the elements from D1.
Chapter:
What possible output(s) from the given options will NOT be displayed when the 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()
3−4−5−4−
2−2−4−5−
4−3−3−5−
5−1−2−4−
Chapter:
The function given below is written to accept a string s as a parameter and 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)Chapter:
Ms. Zoya is a Production Manager in a factory which packages mineral water. She decides to create a table in a database to keep track of the stock present in the factory. Each record of the table will have the following fields:
W_Code – Code of the item (type – CHAR (5))
W_Description – Description of the item (type – VARCHAR (20))
B_Qty – Balance quantity of the item (type – INTEGER)
U_Price – Unit Price of the item (type – FLOAT)
The name of the table is W_STOCK.
- Write an SQL command to create the above table (W_Code should be the primary key).
OR - Can U Price be the primary key of the above table? Justify your answer.
- 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.
OR - Assuming that the table W_STOCK is already created, write an SQL command to remove the column B_Qty from the table.
Chapter:
Advertisements
What is protocol in the context of computer networks?
Chapter:
Which protocol is used to transmit hypertext across the web?
Chapter:
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:
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 planned for 2030, humanity's cosmic journey continues!
Then the function should return 11.
Chapter:
Write a Python function that displays the words in which the lowercase 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 planned for 2030, humanity’s cosmic journey continues!
Then the function should display:
incredible advancements science agencies serves research.
Chapter:
A stack named FruitStack, implemented using list, contains records of 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:
push_fruit(FruitStack, Fruit): This function takes the stackFruitStackand a new recordFruitas arguments and pushes the record stored inFruitontoFruitStackif thePriceis less than100.pop_fruit(FruitStack): This function pops the topmost record from the stack and returns it. If the stack is already empty, the function should display "UNDERFLOW".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'.
Chapter:
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
Chapter:
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:
new.pop()
print(new)
Exam2026("Gold-24Medals")
Chapter:
Write def the output of the following code:
def Exam2026(given) :
new = 0
while given:
if new % 2:
new += given % 10
else:
new += given % 5
print(new, end='-')
given //= 10
Exam2026(123456)Chapter:
Abhishek has created a table, named STOCK, with a set of records to maintain the data of packaged milk in his shop. After creating the table, he entered the data and the table looked as follows:
| Code | Type | Volume | Qty | Price |
| AF0.5 | F | 0.5 | 300 | 38.00 |
| MFO.5 | F | 0.5 | 250 | 36.50 |
| MT1.О | T | 1.0 | 150 | 64.00 |
| AT1.0 | T | 1.0 | 100 | 66.00 |
| PD1.0 | D | 1.0 | 50 | 52.00 |
| PT0.5 | T | 0.5 | 78 | 30.00 |
Based on the data given above, write the SQL queries for the following tasks:
- To display
Typeand the maximumPricefor eachTypeof milk. - For each record, increase the
Priceby 0.5 whereTypeis 'F'. - To display the total value of the stock (total of
QtyxPrice). - To display the details of all records where
Codestarts with'A'.
Chapter:
Abhishek has created a table, named STOCK, with a set of records to maintain the data of packaged milk in his shop. After creating the table, he entered the data and the table looked as follows:
| Code | Type | Volume | Qty | Price |
| AF0.5 | F | 0.5 | 300 | 38.00 |
| MFO.5 | F | 0.5 | 250 | 36.50 |
| MT1.О | T | 1.0 | 150 | 64.00 |
| AT1.0 | T | 1.0 | 100 | 66.00 |
| PD1.0 | D | 1.0 | 50 | 52.00 |
| PT0.5 | T | 0.5 | 78 | 30.00 |
STOCK as given above, write the output on execution of the following queries :SELECT Volume, Qty, Price FROM STOCKWHERE Type IN ('F', 'D');SELECT Code, Qty FROM STOCKWHERE Price BETWEEN 30 AND 50;SELECT DISTINCT Type FROM STOCK;SELECT Volume, count(*) FROM STOCK GROUP BY Volume;
Chapter:
- Name of the State
- Capital of the State
- Population of the State
- Official Language of the State
['Andhra Pradesh', 'Amaravati', 52221000, 'Telugu']10000000 into another csv file 'More.csv'.Header row. The Header row should NOT be copied to "More.csv".Chapter:
Assume that you are the Manager of the Loans department of a Finance House. To keep track of the loans you have created two tables : CUSTOMERS and 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 | CID | L Amt | L Date | Terms | RoI |
| 1 | 00003 | 200000 | 2025-12-06 | 60 | 7.80 |
| 2 | 00008 | 2500000 | 2023-08-09 | 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.
- Number of records from LOANS table where Rate of Interest (RoI) is above 7.0.
- Names of the customers whose loan amount (L_Amt) is above 1000000.
- C_ID, C_Name and Terms of all those records where Loan Date (L_Date) is after 31st December, 2024.
- (a)
- Details of all the loans in the descending order of RoI.
OR - C_ID and average term for each C_ID from the LOANS table.
- Details of all the loans in the descending order of RoI.
Chapter:
Peter has created a table named Account in MySQL database, SCHOOL, having 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.
Note the following to establish connectivity between Python and MySQL:
- Username - admin
- Password - root
- Host - localhost
Chapter:
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)
Append()– To input the data of a Resource Person and write it in the file RESOURCES.DAT.Update()– To increase the Charges of each resource person by 500.
Chapter:
Sanjeevani is a big group of educational institutions with its head office in Hyderabad. It is planning to set up a new University in Amritsar. The Amritsar University Campus will have four blocks/buildings − ADMIN, ACADEMIC, HOSTEL, 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.
Amritsar University Campus

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 |
- Suggest the most appropriate location of the server inside the Amritsar University Campus. Justify your choice.
- Draw the cable layout to efficiently connect various blocks within the Amritsar University Campus.
- Name any two wired media that can be used to connect various computers of a block inside Amritsar Campus.
- For the academic purpose, the University will provide its own 24 x 7 FM channel within the University Campus. Which communication medium, out of the following, is used by FM?
- Radio Waves
- Micro Waves
- Infrared Waves
- 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.
OR - Where should a repeater be installed in Amritsar University campus to boost the signal between blocks? Justify your answer.
- 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.
Chapter:
Other Solutions
Submit Question Paper
Help us maintain new question papers on Shaalaa.com, so we can continue to help studentsonly jpg, png and pdf files
CBSE previous year question papers Class 12 Computer Science (Python) with solutions 2025 - 2026
Previous year Question paper for CBSE Class 12 Computer Science (Python)-2026 is solved by experts. Solved question papers gives you the chance to check yourself after your mock test.
By referring the question paper Solutions for Computer Science (Python), you can scale your preparation level and work on your weak areas. It will also help the candidates in developing the time-management skills. Practice makes perfect, and there is no better way to practice than to attempt previous year question paper solutions of CBSE Class 12.
How CBSE Class 12 Question Paper solutions Help Students ?
• Question paper solutions for Computer Science (Python) will helps students to prepare for exam.
• Question paper with answer will boost students confidence in exam time and also give you an idea About the important questions and topics to be prepared for the board exam.
• For finding solution of question papers no need to refer so multiple sources like textbook or guides.
