THE SHRI RAM UNIVERSAL SCHOOL, GHAZIABAD
HALF YEARLY EXAMINATION (2024-25)
SUBJECT-COMPUTER SCIENCE (083)
CLASS – 11
TIME-3 HOURS M. MARKS-70
General Instructions:
Please check this question paper contains 35 questions.
The paper is divided into 4 Sections- A, B, C, D and E.
Section A, consists of 18 questions (1 to 18). Each question carries 1
Mark.
Section B, consists of 7 questions (19 to 25). Each question carries 2
Marks.
Section C, consists of 5 questions (26 to 30). Each question carries 3
Marks.
Section D, consists of 2 questions (31 to 32). Each question carries 4
Marks.
Section E, consists of 3 questions (33 to 35). Each question carries 5
Marks.
All programming questions are to be answered using Python Language
only.
Que Question Mark
s s
No
SECTION A
1 Which of the following is a valid binary number? 1
a. 1021
b. 1101
c. 11012
d. 0123
2 Fill in the blank: 1
In Python, a sequence of characters enclosed within either single
quotes or double quotes is known as a ________.
3 State True or False: 1
The `while` loop in Python can execute zero or more times depending
on the condition.
[1]
What will be the output of the following Python expression?
4 `print(2**3 + 5//2)`
a. 9
b. 10
c. 8
d. 7
6 Fill in the blank: 1
The binary number system uses only two digits, _______ and _______.
7 What will be the result of the following code snippet? 1
lst = [10, 20, 30, 40]
lst.append(50)
print(lst)
a. [10, 20, 30, 50]
b. [10, 20, 30, 40]
c. [10, 20, 30, 40, 50]
d. [50, 40, 30, 20, 10]
8 Convert the decimal number 25 to binary. 1
a. 11001
b. 10101
c. 11011
d. 10111
9 What does the following Python code do?
x=5
while x > 0:
x -= 1
print(x)
a. Prints 5
b. Prints 4
c. Prints 0
d. Causes an error
10 Which of the following functions can be used to get the length of a list
in Python?
a. `size()`
b. `length()`
c. `len()`
d. `count()`
11 Fill in the blank: 1
In Python, the `break` statement is used to __________.
12 What will be the output of the following Python code? 1
a, b = 10, 20
a, b = b, a
[2]
print(a, b)
a. 10 20
b. 20 10
c. 10 10
d. 20 20
13 Convert the hexadecimal number 3F to decimal. 1
a. 63
b. 47
c. 53
d. 31
14 What will be the output of the following Python code?
lst = [2, 4, 6, 8]
print(lst[-1])
a. 2
b. 4
c. 6
d. 8
Which of the following statements will correctly create a tuple in 1
15 Python?
a. `tuple1 = (1, 2, 3)`
b. `tuple1 = [1, 2, 3]`
c. `tuple1 = {1, 2, 3}`
d. `tuple1 = {1: 2, 3: 4}`
Questions 16 to 18 are Assertion-Reasoning based. Choose the correct
option:
16 Assertion (A): The list data type in Python is immutable. 1
Reason (R): Lists are sequences of elements that cannot be modified
once created.
a. Both A and R are true, and R is the correct explanation of A.
b. Both A and R are true, but R is not the correct explanation of A.
c. A is true, but R is false.
d. A is false, but R is true.
17 Assertion (A): The `elif` statement in Python is used to check multiple 1
conditions.
Reason (R): The `elif` statement is only used after an `if` statement.
a. Both A and R are true, and R is the correct explanation of A.
b. Both A and R are true, but R is not the correct explanation of A.
c. A is true, but R is false.
d. A is false, but R is true.
18 Assertion (A): In Python, a tuple can contain elements of different data 1
types.
Reason (R): Tuples are mutable, meaning they can be changed after
creation.
a. Both A and R are true, and R is the correct explanation of A.
[3]
b. Both A and R are true, but R is not the correct explanation of A.
c. A is true, but R is false.
d. A is false, but R is true.
SECTION B
19 Define the term "bit" and explain its significance in computer systems. 1+1=
2
20 Write a Python function `find_maximum(L)` that takes a list `L` of 2
integers as input and returns the maximum value in the list.
21 Differentiate between `for` and `while` loops in Python with an example
for each.
22 Convert the binary number `101101` to its equivalent decimal and 2
hexadecimal forms.
23 Write a Python function `count_vowels(s)` that takes a string `s` as 1+1=
input and returns the number of vowels in the string. 2
24 Explain the difference between lists and tuples in Python with 2
examples.
25 Write a Python function `is_even(n)` that returns `True` if the integer `n`
is even and `False` otherwise.
SECTION C
26 Predict the output of the Python code given below: 3
def sum_series(n):
s=0
for i in range(1, n+1):
s += i
return s
print(sum_series(5))
27 Write a Python program to convert a given decimal number to its binary
equivalent without using built-in functions.
28 Explain the concept of "recursion" in Python with an example. Write a 3
recursive function to calculate the factorial of a number.
29 Given the list `L = [2, 3, 5, 7, 11, 13]`, write a Python function 1*3=
`sum_even(L)` that returns the sum of all even numbers in the list. 3
30 Describe the role of control statements in Python programming. Provide 3
examples of `if`, `elif`, and `else` statements in a simple program.
[4]
SECTION D
31 Write a Python program to check whether a given string is a palindrome 1*4=
or not. The program should ignore spaces, punctuation, and case 4
differences.
32 Discuss the importance of data representation in computer systems. 4
Explain how different data types are stored in memory with examples.
SECTION E
Write a Python program to read a list of numbers from the user, store 2+3=
33 them in a list, and then find and print the second largest number in the 5
list.
OR
Write a Python program that takes a list of numbers and removes
duplicates, returning a new list without any duplicates.
34 Design a class `Student` in Python with attributes `name`, `roll
number`, and `marks`. Implement methods to add marks, display
student details, and calculate the average marks of a student.
OR
Design a class `Rectangle` in Python with attributes `length` and
`breadth`. Implement methods to calculate the area and perimeter of
the rectangle. Write a program to create a rectangle object and display
its area and perimeter.
35 Write a Python program that reads a string and counts the number of 2+3=
words, characters, and lines in the string. The program should output 5
the counts in a formatted
[5]