Class XI & XII Computer Science: Python

12th Class Computer Science Mid Term Exam 2025-26: St. Margaret School, Rohini

12th Class CBSE Board Computer Science (083) Mid Term Examination (2025-26): St. Margaret Sr. Sec. School, Prashant Vihar, Sector 14, Rohini, Delhi-85 India

School Name: St. Margaret Sr. Sec. School, D-BLOCK, Prashant Vihar, Sector 14, Rohini, Delhi, 110085
Class: 12th Standard (CBSE)
Subject: Computer Science
Time Duration: 01 Hours
Maximum Marks: 30
Date:  30 / 09 / 2025

General Instructions: 12th Class Computer Science  Exam 2025-26

This question paper contains 37 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 to 37). Each question carries 5 marks.
  • In the case of MCQs, the text of the correct answer should also be written.

SECTION – A (21×1=21 Marks)

Question 01: State True or False

“Variable declaration is implicit in Python.”

Question 02: Identify the invalid data type in Python

a. Set b. None c. Integer d. Real

Question 03: Identify the correct assignment statement in Python:

a.  b.  c.  d. 

Question 04: Consider the given expression: not True and False or True

Which of the following will be the correct output if the given expression is evaluated?

a. Null b. True c. False d. NONE

Question 05: Identify the secondary storage device

a. Monitor b. Speaker c. Pendrive d. Mouse

Question 06:  Identify the valid keyword

a. true b. if c. If d. While

Question 07: Following software is an application software

a. PhotoShop b. Windows c. Linux d. Python

Question 08: I am volatile

  • a. PD
  • b. HDD
  • c. CD
  • d. RAM

Question 09: Identify the output

print(15.0/4 + (8+3.0))

  • a. 14.75
  • b. 14.0
  • c. 15
  • d. 15.5

Question 10: The output of:

print(type("5")) is

a. Error b. <class ‘str’> c. class ‘int’ d. <class int>

Question 11: Plotter is used for

a. input b. output c. storage d. None

Question 12: Input function accepts a

a. tuple b. a numeric value c. list d. text value

Question 13: The code written by a programmer is

a. object Code b. source Code c. machine code d. underlying Code

Question 14: Identify the arithmetic operator out of the following:

  • a. ++
  • b. **
  • c. >-
  • d. not

Question 15: Identify mutable datatypes. 

i. lists  ii. Strings  iii. tuples  iv. Float

  • a. Only i
  • b. i and ii
  • c. i, ii, iii and iv
  • d. ii and iv

Question 16. Write the full form of BIOS

Question 17: How many times will the following loop execute? Explain.

x = ‘abcd’
for i in x:
print(i)

Question 18: Explain the memory of a computer.

Question 19: Create a list containing names of any 5 fruits.

Question 20. Q20 and Q21 are Assertion (A) and Reason (R) based questions. Mark the choice as:

  • a) Both A and R are true and R is the correct explanation for A
  • b) Both A and R are true and R is not the correct explanation for A
  • c) A is true, but R is false.
  • d) A is false, but R is true.

Assertion (A): List is an immutable data type.
Reasoning (R): Updating an immutable variable creates a new one; old ones are destroyed.

Question 21:

Assertion (A): range() function generates a list of values.
Reasoning (R): range() is used with a for loop.

SECTION – B ( Marks)

Question 22. Explain the following Python data types with one example each:

a) int b) float c) str d) bool

Question 23. Define the entry-controlled loop in PYTHON, with an example.

Question 24. Differentiate between an interpreter and a compiler.

Question 25. Write a Python program to check whether an entered number is prime or not.

Question 26. Explain the purpose of the break statement in loops with an example.

Question 27. Explain the IPO cycle briefly.

Question 28. Write Python expressions to represent the following:

a. Find the integral part of the quotient when 63 is divided by 29.

b. Add the remainder of  to the product of 6 and 5.

SECTION – C ( Marks)

Question 29. Write a Python program that prints the multiplication table of a number entered by the user in a proper format like:

5 x 1 = 5
5 x 2 = 10
:
5 x 10 = 50
(if user enters 5)

Question 30. Give the output of the following:

a, b, c = 13, 76, 3
a, c, a = a*2, b//3, a*c
print(a, b, c)

Question 31. Design a Python program to input marks of three subjects, calculate the average and display the grade as per the following conditions:

  • Average ≥90: Grade A
  • 75≤ Average < 90: Grade B
  • 50≤ Average < 75: Grade C
  • Else: Grade D

SECTION – D ( Marks)

Question 32. Perform the following conversions:

a. 10 MB = 10485760 bytes b. 65 KB = 66560 bytes c. 1 nibble = 4 bits d. 15 GB = 15728640 KB

Question 33. Give the output of the following:

# Part 1
x = 56, 23
print(x)

# Part 2
x = 90
x += 45
x %= 3
# The following line contains an error as ‘y’ is used before assignment.
y, x, y = x+1, x-1, y+1
print(x, y, sep=’*’, end=’A’)

Question 34. Input the number of terms (n), first term (a), and common difference (d) of an arithmetic progression and generate n terms of the AP, along with their sum. Provide proper print messages along with comments, wherever required.

(hint: Terms are calculated as a, a+d, a+2d,…, a+nd)

Question 35. Differentiate between the following, with an example:

a. Scanner and Printer

b. MICR and OCR

SECTION – E ( Marks)

Question 36. This question consists of two parts.

  • a. Predict the output of the following code:
    python for i in range(1, 4):
    for j in range(1, i+1):
    print(j, end=””)
    print()
  • b. How do you compare the two loops available in the PYTHON language? Justify your answer with an appropriate example.

Question 37. Predict the output of the following codes:

A)

x = 3
if x == 0:
print (“Am I learning python?”, end = ‘ ‘)
elif x == 3:
print(“Or learning python?”, end = ‘ ‘)
else:
print()
print (“Or learning python 4 cbse?”)

B)

car_color = “blue”
if 3 > 2:
if car_color == “black”:
print(“You rock!”)
else:
print(“Boring”)

C)

name = “maya”
if name == “saya”:
print(“delhi”)
elif name == “mana”:
print(“mumbai”)
else:
print(“india”)

D)

x = 3
if x > 2 or x < 5 and x == 6:
print(“ok”)
else:
print(“no output”)

E)
for i in range(10, 20, 4):
print(i)

Check Also

11th Class Physics NCERT Textbooks

Class: XI Physics PT–II EXAMINATION 2025–26 ST. MARGARET SR. SEC. SCHOOL

ST MARGARET SR SEC. SCHOOL PT–II EXAMINATION 2025–26 Subject: Physics Class: XI Set: SET – …