Class11 1
Class11 1
2024-25 Computer
Science (083)
Question Paper
Maximum Marks: 70 Time Allowed: 3
hours General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks
each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each.
8. All programming questions are to be answered using Python Language
only.
SECTION
A
1. Negative index -1 belongs to of string. 1
(a) first character (b) last character (c) second last character
(d) second character
2. What is the output of the following 1
code ? str1= "Mission 999"
str2= "999"
print(str1.isdigit(), str2.isdigit())
(a) False True (b) False False (c) True False (d) True True
3. Select the correct output of the following String 1
operations. str1= 'Waha'
print (str1[:3] + ' Bhyi ' + str1[-3:])
(a) Wah Bhyi Wah (b) Wah Bhyi aha(c) WahBhyiWah(d) WahBhyiWaha
(a) True
(b) False
(c) NONE
(d) NULL
1
a = a.split('2')
b = a[0] + ". " + a[1] + ". " + a[3]
print (b)
(a) Statement 3
(b) Statement 4
(c) Statement 5
(d) Statement 4 and 5
10. List can contain values of these types: 1
(a) integers (b) floats (c) lists (d) tuples (e) all of these
11. To find the last element of list namely 'smiles' in Python, will be used. 1
12. Given a list L= [10, 20, 30, 40, 50, 60, 70], what would L[1: 4] return? 1
(a) [10, 20, 30, 40] (b) [20, 30, 40, 50] (c) [20, 30, 40] (d) [30, 40,
50]
13. Fill in the blank: 1
Lists are data types and thus their values can be changed.
2
15. Fill in the blank:
The operator replicates a tuple. 1
3
25. Are dictionaries mutable? Justify your answer with 2
suitable example.
4
SECTION
C
26. Consider the following code: 3
string =input("Enter a
string :") count = 3
while True:
if string[0]=='a':
string =
string[2:] elif
string[-1] == ‘b’:
string = string[:2]
else:
count
+= 1
break
print
(string)
print
(count)
5
29. Consider a list: 3
list1 = [6,7,8,9]
What is the difference between the following
operations on list1:
(a) list1+[2]
(b) list1 += [2]
(c) list1= list1 + [2]
6
30. What will be the output of the following code 3
segment: (a) myList = [1,2,3,4,5,6,7,8,9,10]
del
myList[3:]
print(myList
)
(b) myList = [1,2,3,4,5,6,7,8,9,10]
del
myList[:5]
print
(myList)
(c) myList = [1,2,3,4,5,6,7,8,9,10]
del
myList[::2]
print
(myList)
SECTION
D
31. Case Study: 5
In the vibrant world of tech at Tech Academy, a student named Emma explores
the realms of programming languages, web development, data science, and AI.
She keeps track of her favorite programming languages and their usage
frequency:
1) How can you update the usage frequency of 'Java' to 42 in the frequency
list?
2) What code should be used to delete the programming language 'C' from
the languages list?
4) How can you add the programming language 'Swift' to the end of the
languages list?
7
32. Write any five built-in functions of list with suitable 5
examples
Or
8
SECTION
E
34. Define following functions of strings : 4
a) <string>.strip()
b) <string>.endswith()
c) <string>.replace(old,new)
d) <string>.isupper()
35. Write a program that asks the user for a string and 4
creates a new string that doubles each character of the
original string. For instance, if the user enters Sipo, the
output should be SSiippoo.
Or
Write a Python program to create a simple student
record book. The program should allow the user to
input names and corresponding student registration
number. Use a dictionary to store the registration
number, where each name is associated with a
registration number. The program should provide the
following functionalities:
1. Add a new record to the student record.
2. Display the entire record with student’s name’s
and registration numbers.
Note: Ensure that the registration number has a valid
length (e.g., 13 digits).