Summer Holidays Homework - 12computer Science
Summer Holidays Homework - 12computer Science
COMPUTER SCIENCE
Q3: Which of the following will delete key-value pair for key = “Red” from a 1
dictionary D1?
a. delete D1("Red")
b. del D1["Red"]
c. del.D1["Red"]
d. D1.del["Red"]
Q4: Consider the statements given below and then choose the correct output 1
from the given options:
pride="#G20 Presidency"
print(pride[-2:2:-2])
a. ndsr b. ceieP0 c. ceieP d. yndsr
Which of the following statements should be given in the blank for #Missing
Statement, if the output produced is 110?
a. global a
b. global b=100
c. global b
d. global a=100
Q7: Which of the following is a valid identifier? 1
a. Student Name b. 3Number c. %Name% d. Block_number
Q8: A variable created or defined within a function body is classified as: 1
a. local b. global c. built-in d. instance
Q9 and 10 are ASSERTION AND REASONING based questions. Mark the correct 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
Q9: Assertion(A): Dictionaries in Python are mutable. 1
Reasoning(R): The data inside a dictionary is stored as the key: value pairs
enclosed within the curly braces {}
Q10: Assertion(A): To use positional arguments, the arguments need to be 1
passed in the same order as their respective parameters in the function
definition. Reasoning(R): If three positional arguments are to be passed to
the function, the first argument will be assigned to the first parameter,
second argument to the second parameter and the third argument to the third
parameter.
Q11: Anamika was writing a code. While writing she has done some mistakes. 2
Help her by rewriting the code again. Also underline each correction done
in the code.
Value = 30
for VAL in range(0, Value)
IF VAL%4=0:
print(val*4)
ElseIf VAL%5==0:
print(VAL+3)
else
print(VAL+10)
Q12: Predict the output of the following code: 2
Q13: Help Fatima to identify the local and Global variable in the following code: 2
x=100
def myfunc(a):
k=a
print(k,a)
p=(0,1,2,3,4)
myfunc(p)
print(x)
Q14: Bunny wants to perform the following tasks on the list. Tell him the most 2
appropriate methods to do so.
(a) Delete a given element from the list
(b) Get the position of an item in the list.
(c) Delete the 3rd element from the list.
(d) Add a single element at the end of the list.
Q15: Cshelvi has to shift a list arr of numbers where n is a numeric value by 3
which all elements of the list are to be shifted to the left. Write function in
python to help Cshelvi in achieving her task.
Sample input data of the list arr=[1,2,3,4,5,6]
Output arr=[3,4,5,6,1,2]
Q17: Elena has to find sum of all items in a list. Do write a function to find sum 3
of all items in list.
Q18: Write a python function to get the largest number from a list (1,2,-8,0). 3
Q19: Predict the output of the following code: 3
2. COMPLETE THE PRACTICAL FILE AND STUDY THE PROJECT FILE WORK
FOR 2025-26 (TOPIC AS PER CBSE LIST, TITLE PAGE,INDEX CERTIFICATE ETC)
ON CBSE WEBSITE.
3. REVISE THE SYLLABUS THAT HAS BEEN DONE IN THE CLASS AND COLLECT
AND STUDY THE CBSE BOARD EXAMINATION PAPERS AND SAMPLE PAPERS
FOR THE YEARS 2022-2023,2023-24 AND 2024-2025.