CBSE Class 11 Computer Science Mid Term Question Paper 2025-26 with Solutions (Evening Shift)

CBSE Class 11 Computer Science Mid Term Question Paper 2025-26 with Solutions (Evening Shift)

CBSE Class 11 Computer Science Mid Term Question Paper 2025-26 with Solutions (Evening Shift)

Section A — Interactive Multiple Choice Questions with Explanations

SECTION B (Short Answer Questions - 2 Marks Each)
Question 22 2 Marks
State whether True / False:
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.
💡 Detailed Solution:

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.

Question 23 2 Marks
Write a program in python that accepts time in minutes and convert it into seconds.
💡 Detailed Solution:
# Accept input in minutes
minutes = float(input("Enter time in minutes: "))

# Convert to seconds
seconds = minutes * 60

# Display output
print("Time in seconds:", seconds)
Question 24 2 Marks
Write a python program to check if a number is divisible by 5 and 7.
── OR ──
Write a python program that prints "Pass" if marks are 40 or above, otherwise "Fail".
💡 Detailed Solution:
Main Question Program:
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")
Question 25 2 Marks
Fill in the blanks:
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.
💡 Detailed Solution:

i). Interface (or User Interface / GUI / CLI)

ii). Kernel

Question 26 2 Marks
Write a Python program to input principal, rate, and time from user and calculate and display simple interest.
💡 Detailed Solution:
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)
Question 27 2 Marks
Write a Python program to calculate and display the sum of the series (where n is a positive integer entered by the user):
1² + 2² + 3² + ... + n²
── OR ──
Write a Python program to calculate and display the sum of the series (where n is a positive integer entered by the user):
2 + 4 + 6 + ... + 2n
💡 Detailed Solution:
Main Question Program (Sum of Squares):
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)
Question 28 2 Marks
Consider the logic circuit diagram and answer the following:
Circuit Diagram for Q28
i). Write the boolean expression for value of x
ii). Identify the single logic gate equivalent to the above circuit diagram.
── OR ──
Circuit Diagram for Q28
i). Write the boolean expression for output of the circuit.
ii). Identify the single logic gate equivalent to this circuit diagram.
💡 Detailed Solution:
Main Diagram Solution:

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

SECTION C (Short Answer Questions - 3 Marks Each)
Question 29 3 Marks
Write a python program that takes a number as input and find out the reverse of the number.
── OR ──
Write a program in python to Compute the greatest common divisor and least common multiple of two integers.
💡 Detailed Solution:
Reverse Number Program:
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)
Question 30 3 Marks
Match the items in Column A with their correct pairs in Column B:
Column AColumn B
A. CPU1. Performs arithmetic and logical operations
B. ALU2. Controls and coordinates all operations
C. CU3. Brain of the computer
── OR ──
Match the items in Column A with their correct pairs in Column B:
Column AColumn B
A. Cache Memory1. Non-volatile memory storing firmware like BIOS
B. RAM2. Stores frequently accessed data for faster CPU access
C. ROM3. Temporary memory used while programs are running
💡 Detailed Solution:
Main Part Matching:
  • 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
Question 31 3 Marks
Write the python code to generate Any One of the pattern using Nested For Loop:

Pattern 1:
*****
****
***
**
*
── OR ──
Pattern 2:
P
PQ
PQR
PQRS
PQRST
💡 Detailed Solution:
Code for Pattern 1:
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()
SECTION D (Long Answer Questions - 4 Marks Each)
Question 32 4 Marks
Write suitable words in the blanks to complete the sentences:
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 _________________________________
── OR ──
a). ISCII is an encoding scheme used to represent _______ languages in digital systems.
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.
💡 Detailed Solution:
Main Part Answers:

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

Question 33 4 Marks
From the code below, identify the following:
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 ____________
💡 Detailed Solution:

i) Operators: =, >=, +, -

ii) Identifiers: a

iii) Literals: 20, 15, 1

iv) Punctuators: (, ), :

Question 34 4 Marks
i). Write the output: print(list(range(-30,-20,2)))
ii). Data type of record in: record = 5*4//2**2-7*3
iii). Draw flowchart for:
i = 1
while i <= 5:
    print(i)
    i += 1
iv). Give one example each of implicit and explicit conversion in Python.
💡 Detailed Solution:

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.

Flow Chart for Q34

iv). Examples:
Implicit: a = 5 + 2.0 (Python auto-converts a to float)
Explicit: a = int("10") (Forced conversion using function)

Question 35 4 Marks
An organization installed a smart door lock in its Data Centre; the door opens only when the authorized fingerprint is detected AND the correct password is entered.

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.
💡 Detailed Solution:

i). AND Gate

ii). Expression: Y = A • B (where A = Fingerprint, B = Password)

iii). Truth Table:

ABY
000
010
100
111

iv). Expression: Y = (F + R) • P (where F = Fingerprint, R = Retina Scan, P = Password)

SECTION E (Case Study / Integrated Questions - 5 Marks Each)
Question 36 5 Marks
Write a program in python that accepts marks(out of 100) in five subjects, calculate and display percentage marks, Grade and Remarks (using table given below).
Percentage RangeGradeRemarks
90% - 100%AExcellent
75% - 89%BVery Good
60% - 74%CGood
45% - 59%DAverage
Below 45%ENeed Improvement
💡 Detailed Solution:
# 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)
Question 37 5 Marks
Attempt the following conversions:
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.
💡 Detailed Solution:

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

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top