# IP Class 11 MCQ Chapter 4 List and Dictionaries

1. Which of the following is NOT true about List?
a. List is value mutable
b. List can store heterogeneous items
c. List is size immutable
d. List is ordered collection of items

c. List is size immutable

1. Select correct statement
i. Duplicate items are not allowed to store in List
ii. We can use both index and negative index of list items to access it.

a. i true, ii false
b. i false, ii true
c. both are true
d. both are false

b. i false, ii true

1. To find the total no of elements in list we can use ________ method.
a. length()
b. len()
c. count()
d. find()

b. len()

1. to remove an item from list we can use
a. pop()
b. remove()
c. del()
d. both a and b
e. all of the above

e. all of the above

1. What will be output of given code?
L =[23,34,45,12,32]
Print(L[-3])

a. 45
b. 34
c. Error
d. 12

a. 45

1. Predict the output of
L = [‘s’,’a’,’n’,’j’]
print(L)

a. s
b. j
c. index error
d. sanj

c. index error

1. display the output of given code:
L = [3,5,2]
print(L*2)

a. [ 6, 10, 4]
b. [3, 5, 2, 3, 5, 2]
c. [9, 25, 4]
d. None

b. [3, 5, 2, 3, 5, 2]

1. _________ method adds a new item/list as a single element at the end of list
a. extend()
b. append()
c. insert()
d. list()

b. append()

1. _________ method add an element at a particular index in the list.
a. extend()
b. append()
c. insert()
d. list()

c. insert()

1. to delete an element using its index no we can use
a. pop()
b. remove()
c. delete()
d. find()

a. pop()

1. to delete an element using its value _________ can be used.
a. pop()
b. remove()
c. del()
d. list()

b. remove()

1. _______ method adds each element of list passed as argument at the end of the given list.
a. extend()
b. append()
c. insert()
d. list()

a. extend()

1. Select the correct statement to display the last element of list ‘L’?
a. L[-1]
b. L[len(L)-1]
c. L[len(L)]
d. Both a and b
e. Both a and c

d. Both a and b

1. Select the correct statement to display the first element of list ‘L’?
a. L
b. L
c. L[-len(L)]
d. L[-len(L)-1]

a. L
c. L[-len(L)]

1. Which of the following is correct code to display largest element of list ‘L’?
a. L.sort()
print(L[-1])
b. L.sort(reverse = True)
print(L)
c. max(L)
d. All of the above

d. All of the above

1. Which of the following is correct code to display second largest element of list ‘L’?
a. L.sort()
print(L[-1])
b. L.sort(reverse = True)
print(L)
c. print(sorted(L)[-1])
d. All of the above

d. All of the above

1. Look at the following code and state which type of list operation it carries out?
list = [‘t’,’e’,’c’,’h’,’t’,’i’,’p’,’n’,’o’,’n’,’w’]
for x in list:
print(x)

a. Repeating List
b. Traversing List
c. Slicing list
d. Joining list

a. It doesn’t care of data type of variable being declared.

1. Look at the following code and state which type of list operation is being carried out?

list = [‘t’,’e’,’c’,’h’,’t’,’i’,’p’,’n’,’o’,’n’,’w’]
L = list*3
print(L)

a. Repeating List
b. Traversing List
c. Slicing list
d. Joining list

a. Repeating List

1. Look at the following code and state which type of list operation is being carried out?

list = [‘t’,’e’,’c’,’h’,’t’,’i’,’p’,’n’,’o’,’n’,’w’]
Print(L[2:8:2])

a. Repeating List
b.Traversing List
c. Slicing list
d. Joining list

c. Slicing list

1. Predict the output:
L = [4,5,8,2,1,9]
L.pop(4)
print(L)

a. [4,5,8,1,9]
b. [4,5,8,2]
c. [4,5,8,2,9]
d. [5,8,2,1,9]

c. [4,5,8,2,9]

1. Predict the output:
L = [4,5,8,2,1,9]
L.remove(4)
print(L)

a. [4,5,8,1,9]
b. [4,5,8,2]
c. [4,5,8,2,9]
d. [5,8,2,1,9]

d. [5,8,2,1,9]

1. Find the output of given code?
List1 = [2,3,4,5]
List2 = [6,7,8]
List1.extend(List2)
Print(List1)

a. [2,3,4,5,[6,7,8]]
b. [[2,3,4,5],6,7,8]
c. [2,3,4,5,6,7,8]
d. [[2,3,4,5],[6,7,8]]

c. [2,3,4,5,6,7,8]

1. Find the output of given code?
List1 = [2,3,4,5]
List2 = [6,7,8]
List1.append(List2)
Print(List1)

a. [2,3,4,5,[6,7,8]]
b. [[2,3,4,5],6,7,8]
c. [2,3,4,5,6,7,8]
d. [[2,3,4,5],[6,7,8]]

a. [2,3,4,5,[6,7,8]]

1. What will be output of following code?
list1 = [3,4,6,4,7, 8]
list1.remove(4)
print(list1)

a. [3,4,6,4,8]
b. [3,6,4,7,8]
c. [3,6,7,8]
d. 3,4,6,7,8]

b. [3,6,4,7,8]

1. Raju has created following list:
list1  = [2,5,6,7]
Now he wants to add 12 at the end of list1. Help him to write correct code for it

a. list1.insert(len(list1), 12)
b. list1.append(12)
c. list1.extend()
d. All are correct