CBSE Class 11 Computer Science Mid Term Question Paper 2025-26 with Solutions (Evening Shift)
Section A — Interactive Multiple Choice Questions with Explanations
i) The condition in a while loop in python is checked after executing the loop body.
ii) Improper indentation in python may lead to logical errors even if no syntax error is shown.
i) False — Python's while loop is an entry-controlled loop, meaning the condition is checked before executing the loop body.
ii) True — Incorrect indentation can change the block structure of code, altering logical execution flow without throwing a syntax error.
# Accept input in minutes
minutes = float(input("Enter time in minutes: "))
# Convert to seconds
seconds = minutes * 60
# Display output
print("Time in seconds:", seconds)
num = int(input("Enter a number: "))
if num % 5 == 0 and num % 7 == 0:
print("Divisible by both 5 and 7")
else:
print("Not divisible by both 5 and 7")
OR Part Program:
marks = float(input("Enter marks: "))
if marks >= 40:
print("Pass")
else:
print("Fail")
i). The operating system provides a/an ____________ through which the user can interact with the computer.
ii). ____________ is the core part of the operating system that directly interacts with hardware.
i). Interface (or User Interface / GUI / CLI)
ii). Kernel
P = float(input("Enter Principal amount: "))
R = float(input("Enter Rate of interest: "))
T = float(input("Enter Time (in years): "))
# Simple Interest Formula
SI = (P * R * T) / 100
print("Simple Interest is:", SI)
1² + 2² + 3² + ... + n²
2 + 4 + 6 + ... + 2n
n = int(input("Enter positive integer n: "))
total_sum = 0
for i in range(1, n + 1):
total_sum += i**2
print("Sum of series:", total_sum)
OR Part Program (Sum of Even Numbers):
n = int(input("Enter positive integer n: "))
total_sum = 0
for i in range(1, n + 1):
total_sum += 2 * i
print("Sum of series:", total_sum)
ii). Identify the single logic gate equivalent to the above circuit diagram.
ii). Identify the single logic gate equivalent to this circuit diagram.
i). Output x = (A' • B) + (A • B')
ii). Single equivalent logic gate = XOR Gate
OR Diagram Solution:
i). Output x = (A' • B')'
ii). By De Morgan's Law: (A' • B')' = A'' + B'' = A + B → Single equivalent logic gate = OR Gate
num = int(input("Enter number: "))
rev = 0
temp = num
while temp > 0:
rem = temp % 10
rev = (rev * 10) + rem
temp //= 10
print("Reversed Number:", rev)
OR Part (GCD & LCM Program):
import math
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
gcd = math.gcd(a, b)
lcm = (a * b) // gcd
print("GCD:", gcd)
print("LCM:", lcm)
| Column A | Column B |
|---|---|
| A. CPU | 1. Performs arithmetic and logical operations |
| B. ALU | 2. Controls and coordinates all operations |
| C. CU | 3. Brain of the computer |
| Column A | Column B |
|---|---|
| A. Cache Memory | 1. Non-volatile memory storing firmware like BIOS |
| B. RAM | 2. Stores frequently accessed data for faster CPU access |
| C. ROM | 3. Temporary memory used while programs are running |
- A. CPU ── 3. Brain of the computer
- B. ALU ── 1. Performs arithmetic and logical operations
- C. CU ── 2. Controls and coordinates all operations
OR Part Matching:
- A. Cache Memory ── 2. Stores frequently accessed data for faster CPU access
- B. RAM ── 3. Temporary memory used while programs are running
- C. ROM ── 1. Non-volatile memory storing firmware like BIOS
Pattern 1:
*****
****
***
**
*
P
PQ
PQR
PQRS
PQRST
for i in range(5, 0, -1):
for j in range(i):
print('*', end='')
print()
Code for Pattern 2 (OR):
s = "PQRST"
for i in range(1, len(s) + 1):
for j in range(i):
print(s[j], end='')
print()
a). ASCII character set supports only _______ characters.
b). A/An ____________ is a method for converting data from one format to another, typically for transmission, storage, or processing.
c). ISCII uses _______ bits to represent each character.
d). ISCII Stands for _________________________________
b). Character A in ASCII is represented in Binary as ____________
c). ISCII was designed by the _____________________
d). ____________ is a universal character encoding standard that provides a unique number for every character.
a). 128 (or 256 for Extended ASCII)
b). Encoding / Encoding scheme
c). 8 bits
d). Indian Standard Code for Information Interchange
OR Part Answers:
a). Indian / Indic
b). 01000001 (65 in ASCII)
c). Bureau of Indian Standards (BIS)
d). Unicode
a = 20
if (a >= 15):
a = a + 1
else:
a = a - 1
i) Name all the operators ____________ii) Write all the identifiers ____________
iii) Write all the literals ____________
iv) Write all the punctuators ____________
i) Operators: =, >=, +, -
ii) Identifiers: a
iii) Literals: 20, 15, 1
iv) Punctuators: (, ), :
print(list(range(-30,-20,2)))ii). Data type of record in:
record = 5*4//2**2-7*3iii). Draw flowchart for:
i = 1
while i <= 5:
print(i)
i += 1
iv). Give one example each of implicit and explicit conversion in Python.
i). Output: [-30, -28, -26, -24, -22]
ii). Data Type: int (Since 5*4//4 - 21 = 5 - 21 = -16)
iii). Flowchart Flow: Start ➔ Initialize i=1 ➔ Decision Box i <= 5? ➔ If True: Print i & Increment i=i+1 ➔ Loop back ➔ If False: Stop.
iv). Examples:
• Implicit: a = 5 + 2.0 (Python auto-converts a to float)
• Explicit: a = int("10") (Forced conversion using function)
i). Which logic gate is suitable to implement this scenario?
ii). Write the Boolean expression for the above gate.
iii). Draw the truth table for this logic gate.
iv). Assuming system is enhanced to accept either authorized fingerprint OR retina scan (in addition to correct password), derive the Boolean expression.
i). AND Gate
ii). Expression: Y = A • B (where A = Fingerprint, B = Password)
iii). Truth Table:
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
iv). Expression: Y = (F + R) • P (where F = Fingerprint, R = Retina Scan, P = Password)
| Percentage Range | Grade | Remarks |
|---|---|---|
| 90% - 100% | A | Excellent |
| 75% - 89% | B | Very Good |
| 60% - 74% | C | Good |
| 45% - 59% | D | Average |
| Below 45% | E | Need Improvement |
# Input marks for 5 subjects
m1 = float(input("Enter marks for Subject 1: "))
m2 = float(input("Enter marks for Subject 2: "))
m3 = float(input("Enter marks for Subject 3: "))
m4 = float(input("Enter marks for Subject 4: "))
m5 = float(input("Enter marks for Subject 5: "))
# Calculate Percentage
total = m1 + m2 + m3 + m4 + m5
percentage = (total / 500) * 100
# Grade & Remarks Evaluation
if percentage >= 90:
grade, remark = "A", "Excellent"
elif percentage >= 75:
grade, remark = "B", "Very Good"
elif percentage >= 60:
grade, remark = "C", "Good"
elif percentage >= 45:
grade, remark = "D", "Average"
else:
grade, remark = "E", "Need Improvement"
print("Percentage:", percentage, "%")
print("Grade:", grade)
print("Remarks:", remark)
i) Convert the decimal number (148)10 to its binary equivalent.
ii) Convert the binary number (1100101)2 to its decimal equivalent.
iii) Convert the decimal number (156)10 into a octal number.
iv) Convert the hexadecimal number (F5)16 into its decimal form.
v) Convert the octal number (157)8 into its decimal equivalent.
i) (148)10 to Binary: 148 = 128 + 16 + 4 ➔ (10010100)2
ii) (1100101)2 to Decimal: 64 + 32 + 0 + 0 + 4 + 0 + 1 ➔ (101)10
iii) (156)10 to Octal: 156 ÷ 8 = 19 (rem 4), 19 ÷ 8 = 2 (rem 3) ➔ (234)8
iv) (F5)16 to Decimal: (15 × 16¹) + (5 × 16⁰) = 240 + 5 ➔ (245)10
v) (157)8 to Decimal: (1 × 8²) + (5 × 8¹) + (7 × 8⁰) = 64 + 40 + 7 ➔ (111)10