You are on page 1of 3

KENDRIYA VIDYALAYA SANGATHAN REGIONAL OFFICE – JAMMU

PERIODIC TEST-II (2021-22)


CLASS: XI SUBJECT: COMPUTER SCIENCE
MAXIMUM MARKS: 40 TIME DURATION: 90 MINUTES
----------------------------------------------------------------------------------------------------------------------------------
Instructions:
● There are 3 Sections in the Question Paper.
● Section-A: It contains 08 questions from 1 to 8 of 1 Mark each.
● Section-B: It contains 10 questions from 9 to 18 of 2 Marks each.
● Section-C: It contains 04 questions from 19 to 22 of 3 Marks each.
----------------------------------------------------------------------------------------------------------------------------------
SECTION-A (Q. 1 To 8: Each of 1 Mark)
Q.1 Which is a mutable type of sequence in Python?
A. String B. Tuple C. List D. All of the Above
Q.2 Identify the valid declaration of tuple in Python?
A. Tp= [2, 4, 6] B. Tp=(2 4 6) C. Tp={2, 4, 6} D. Tp=(2, 4, 6)
Q.3 Choose the correct option that can delete item(s) of dictionary
A. get() B. del statement C. getitem() D. None of Above
Q.4 Predict the correct result of the following Python code
dict = {"Jan":1,"Feb":2, "Mar":3}
print (dict[0])
A. “Jan” B. 1 C. (“Jan” :1) D. Error
Q.5 Which of the following statements will create a Tuple of One Element?
A. Tup = (5 ) B. Tup = tuple(5, ) C. Tup=5 D. None of the above
Q.6 What will be the output of the following code segment?
list1 = [10,20,30,10,40,10]
print(list1.index(10))
A. 0 B. [10] C. [0] D. 10
Q.7 Predict the correct Output of code given below.
City=(“Jaipur”, “Jammu”, “Jalandhar”)
print(min(City))
A. Jammu B. Jaipur
C. Jalandhar D. min( ) not works on string values
Q.8 What will be the output of the following Python code snippet?
Edu = (“KVS”, “NVS”)
Edu[1]= ”SAINIK SCHOOL”
print(Edu)
A. (“KVS”, “NVS”,”SAINIK SCHOOL”) B. (“KVS”, ”SAINIK SCHOOL”, “NVS”,)
C. (“KVS”,”SAINIK SCHOOL”) D. Error
SECTION-B (Q. 9 To 18 : Each of 2 Mark)

Q.9 Why is the dictionary termed an unordered collection of objects?

Q.10 How is del DICT different from del DICT[key] if DICT is a dictionary in Python?
OR
How is the clear( ) function different from del <Dictionary> in Python?

Q.11 When should python tuple be preferred over python list?

Q.12 How is List.reverse( ) different from List[::-1] in reference to Python list?

Q.13 Write the result of the following code?


Lst=[10,50,20,30,40]
print(Lst[::-2])
Lst.sort(reverse=False)
print(Lst)

Q.14 DICT1={10:"Sun", 20:"Mon", 30:"Tue", 40:"Wed"}


DICT2={"Sun":30,"Mon":20,"Tue":50}
(A) Write code to find the sum of keys of dictionary DICT1.
(B) Write code to find the sum of values of dictionary DICT2.

Q.15 Read the code below and write appropriate code of given Questions.
L1=[10,20,30]
L2=["Sunday","Monday","Tuesday]
(A) Write python code to add the last element of list L2, at end of list L1.
(B) Insert the first element of list L1, at the beginning of list L2.

Q.16 Tuples in Python are immutable. Write code to prove the statement.

Q.17 Create a dictionary in python whose keys are “name of months” and values are “No. of days” in
corresponding Month.
OR
Create a dictionary in python whose keys are “First Alphabet of day name” and values are “name of day”.

Q.18 Following program is for creating a duplicate dictionary of dictionary “org”. Fill the blank statements so
that the desired task can be achieved.
org={ 'Python' : '.py', 'Word' : '.docx', 'Power Point' : '.pptx' }
print("Original=",org)
dup={}
for key, value in ………..…( ):
dup[.…...]=…………..
print("Duplicate=",dup)
SECTION-C (Q. 19 To 22 : Each of 3 Mark)

Q.19 Explain the following Python List methods with suitable examples.
(A) append( ) (B) extend( ) (C) insert( )

OR
Explain the following methods in reference to Python List with suitable examples.
(A) pop( ) (B) remove( ) (C) clear( )

Q.20 A Tuple TUP=(10,30,50,40,20,60) is given. Write code to display the following.


(A) Reverse of tuple (B) Alternate elements of tuple (C) No. of elements in tuple

Q. 21 Aditi is a student of class XI, she works with Python Tuple named SCHOOL and wants to perform
following tasks. Write codes to help Aditi so that she can achieve the desired result.
(A) Find Maximum element in Tuple (B) Check whether Tuple is Empty or Not
(C) Delete the Tuple from memory

Q.22 Mr. Sumit wants to merge the elements of List1 and List2 into List3. He also wants to arrange the
elements in ascending order in List3. He missed some concepts and left the blank line in the program. Read
the code written by Sumit and give answers of questions (A), (B) and (C) to complete the program.
List1=[50,20,45,97,65,16]
List2=[15,10,50,35,90]
List3=[ ]
For num in List1:
List3. _____________ # Statement-1
List3. ___________________ # Statement-2
print("List1: ",List1)
print("List2: ",List2)
print("List3 before sorting: ",List3)
List3. ____________________ # Statement-3
print("List3 After Sorting: ",List3)

(A) Statement-1: to add the elements “from List1” to “at the end of List3”, one by one.
(B) Statement-2: to add all the elements “from List2” to “at the end of List3” in one go.
(C) Statement-3: for arranging the elements of List3 in ascending order.

You might also like