CBSE Class 12 CS 083 Board Question Paper 2025-26 with Solution

CBSE Class 12 Computer Science (083) Board Exam 2025–26 was held today, March 25, 2026. The paper was moderate and balanced, covering important topics like Python programming, Data Structures, File Handling, and MySQL (SQL queries). Most questions were NCERT-based and similar to previous year papers, making it easier for prepared students. However, some logic-based and application questions in Python and SQL were slightly tricky.

Class-12-CS-083-CBSE-Board-Previous-Year-Question-Paper-2025-26-with-Solution

In this post, you will get the CBSE Class 12 CS (083) Question Paper 2026 with Solutions. The answers are explained in a simple and step-by-step method to help you check your performance and estimate your score. This post is also helpful for board exam preparation, revision, and practice for future students.

CBSE CLASS 12 COMPUTER SCIENCE (083) - SOLUTION

Class 12 CS (Code 083) - Previous Year Question Paper
(Session 2025-26)

Exam Date: March 25th, 2026
Series Q3SPR
Question Paper Code 91 Set 4

Time allowed : 3 hours
Maximum Marks : 70

General Instructions:
  1. This question paper contains 37 questions and five sections, Section A to E.
  2. All questions are compulsory.
  3. Section A have 21 questions carrying 1 mark each.
  4. Section B has 7 Very Short Answer type questions carrying 2 marks each.
  5. Section C has 3 Short Answer type questions carrying 3 marks each.
  6. Section D has 4 Long Answer type questions carrying 4 marks each.
  7. Section E has 2 questions carrying 5 marks each.
  8. All programming questions are to be answered using Python Language only.
  9. In case of MCQs, text of the correct answer should also be written.
SECTION A (21x1=21)

1. State True or False:
In Python, data type of 74 is same as the data type of 74.0.
Ans: False

2. Identify the output of the following code snippet:
s = "the Truth"
print(s.capitalize())
a) The truth
b) THE TRUTH
c) The Truth
d) the Truth

3. Which of the following expressions in Python evaluates to True?
a) 2 > 3 and 2 < 3
b) 3 > 1 and 2
c) 3 > 1 and 3 > 2
d) 3 > 1 and 3 < 2

4. What is the output of the following code snippet?
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']

5. What will be the output of the following statement?
print("PythonProgram"[-1:2:-2])
Ans: Output: mrP

6. What will be the output of the following code snippet?
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')

7. Which of the following statements is true about dictionaries in Python?
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.

8. If L is a list with 6 elements, then which of the following statements will raise an exception?
a) L.pop(1)
b) L.pop(6)
c) L.insert(1,6)
d) L.insert(6,1)

9. 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='*')
a) 3-2
b) 3-2*
c) 3-None
d) 3*None-

10. 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) a
b) rb
c) r+
d) rb+

11. State whether the following statement is True or False:
In Python, Logical errors can be handled using try.....except.....finally statement.
Ans: False

12. A table has two candidate keys, one of which is chosen as the primary key. How many alternate keys does this table have?
a) 0
b) 1
c) 2
d) 3

13. Which of the following SQL command can change the degree of the existing relation?
a) DROP TABLE
b) ALTER TABLE
c) UPDATE...SET
d) DELETE

14. What will be the output of the query?
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

15. 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?
a) 4
b) 5
c) 6
d) 7

16. Which aggregate function in SQL returns the smallest value from a column in a table?
a) MIN()
b) MAX()
c) SMALL()
d) LOWER()

17. With respect to computer networks, which of the following is the correct expanded form of RJ 45?
a) Radio Jockey 45
b) Registered Jockey 45
c) Radio Jack 45
d) Registered Jack 45

18. Which network device serves as the entry and exit point of a network, as all data 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

19. Expand the term XML.
Ans: Extensible 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).
b) Both Assertion (A) and Reason (R) are true and Reason (R) is not the correct explanation for Assertion (A).
c) Assertion (A) is true, but Reason (R) is false.
d) Assertion (A) is false, but Reason (R) is true.

20. Assertion (A): [1,2,3] + '123' is an invalid expression in Python.
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).

21. 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.
Ans: c) Assertion (A) is true, but Reason (R) is false.

SECTION B (7x2=14)

22. What is the difference between default parameters and positional parameters in Python? Also give an example of a function header which uses both.

23. Write a Python statement to perform the following tasks: (USE BUILT_IN FUNCTIONS / METHODS ONLY)
(i) To create a new list L1 containing the elements of list L arranged in ascending order, without modifying list L.
(ii) A statement to check whether the given character, ch is an alphabet or a number.

24. Assuming that D1 is a dictionary in Python,
(i) (a) Write a Python expression to check if the key, 'RNo' is present in D1.
OR
(b) Write a Python expression to check if any key in D1 has a value 12.

(ii) (a) 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.
OR
(b) Write a single statement to delete all the elements from D1.

25. 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()
Options:
(A) 3-4-5-4-
(B) 2-2-4-5-
(C) 4-3-3-5-
(D) 5-1-2-4-

26. 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)

27. 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.
(i) (a) Write an SQL command to create the above table (W_Code should be the primary key).
OR
(b) Can U_Price be the primary key of the above table? Justify your answer.

(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.
OR
(b) Assuming that the table W_STOCK is already created, write an SQL command to remove the column B_Qty from the table.

28. List one advantage and one disadvantage of Bus topology.
OR
What is protocol in the context of computer networks? Which protocol is used to transmit hypertext across the web?

SECTION C (3x3=9)

29. (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:
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.

OR

(b) 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

30. (a) 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:
(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.
(ii) 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".
(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".

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

31. Write the output of the following code:
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")

OR

Write 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)

SECTION D (4x4=16)

32. 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
AFO.5 F 0.5 300 38.00
MFO.5 F 0.5 250 36.50
MT1.0 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
(a) Based on the data given above, write the SQL queries for the following tasks:
(i) To display Type and the maximum Price for each Type of milk.
(ii) For each record, increase the Price by 0.5 where Type is 'F'.
(iii) To display the total value of the stock (total of Qty × Price).
(iv) To display the details of all records where Code starts with 'A'.

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');
(ii) SELECT Code, Qty FROM STOCK WHERE Price BETWEEN 30 AND 50;
(iii) SELECT DISTINCT Type FROM STOCK;
(iv) SELECT Volume, COUNT(*) FROM STOCK GROUP BY Volume;

33. A csv file "States.csv" contains some data about all the states of India. Each record of the file contains the following data:
Name of the State
Capital of the State
Population of the State
Official Language of the State
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".

34. 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 C_ID 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.
The management of the Finance House needs certain reports from you. Write the queries to extract the following data to create the reports:
(i) Number of records from LOANS table where Rate of Interest (ROI) is above 7.0.
(ii) Names of the customers whose loan amount (L_Amt) is above 1000000.
(iii) C_ID, C_Name and Terms of all those records where Loan Date (L_Date) is after 31st December, 2024.
(iv) (a) Details of all the loans in the descending order of ROI.
OR
(b) C_ID and average term for each C_ID from the LOANS table.

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

SECTION E (2x5=10)

36. NextStep is an organization which has a pool of resource persons to conduct training workshops on various topics related to ICT. The data of all its Resource 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.
(ii) Update() – To increase the Charges of each resource person by 500.

37. 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 Layout:
Class-12-CS-083-CBSE-Board-Previous-Year-Question-Paper-2025-26-with-Solution-Q37
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
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.
(ii) Draw the cable layout to efficiently connect various blocks within the Amritsar University Campus.
(iii) Name any two wired media that can be used to connect various computers of a block inside Amritsar Campus.
(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?
(A) Radio Waves
(B) Micro Waves
(C) Infrared Waves
(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.
OR
(b) Where should a repeater be installed in Amritsar University campus to boost the signal between blocks? Justify your answer.

Download Now - Class 12 CS 083 Previous Year Question Paper (PYQP) 2025-26 with Solution

Download-CBSE-Class-12-IT-802--Board-Question-Paper-with-Solution

Year wise Pre-Board and CBSE Previous Year Question Papers with Solution – Class 12 Computer Science (Code 083)

CBSE Class 12 CS 083 PYQP 2026-27 with Solution

CBSE Class 12 CS 083 PYQP 2025-26 with Solution

CBSE Class 12 CS 083 PYQP 2024-25 with Solution

CBSE Class 12 CS 083 PYQP 2023-24 with Solution

CBSE Class 12 CS 083 PYQP 2022-23 with Solution

CBSE Class 12 CS 083 PYQP 2021-22 (Term 2) with Solution

CBSE Class 12 CS 083 PYQP 2021-22 (Term 1) with Solution

CBSE Class 12 CS 083 PYQP 2019-20 (Compartment) with Solution

CBSE Class 12 CS 083  PYQP 2018-19 with Solution

Post a Comment

Previous Post Next Post