Class 1 Class 2 Class 3 Class 4 Class 5 Class 6 Class 7 Class 8

MCQ on List Tuple and Dictionary in Python

Teachers and Examiners (CBSESkillEduction) collaborated to create the MCQ on List Tuple and Dictionary in Python. All the important Information are taken from the NCERT Textbook Computer Science (083) class 11.

MCQ on List Tuple and Dictionary in Python

1. A ________ is an ordered sequence of elements of different data types, such as integer, float, string or list.
a. Tuple 
b. Dictionaries
c. List
d. None of the above

Show Answer тЯ╢
a. Tuple

2. Elements of a tuple are enclosed in ________ and are separated by ________.
a. Parenthesis and commas 
b. Curly Brackets and commas
c. Both a) and b)
d. None of the above

Show Answer тЯ╢
a. Parenthesis and commas

3. In Tuple, If we assign the value without comma it is treated as ________.
a. Integer 
b. String
c. Decimal
d. None of the above

Show Answer тЯ╢
a. Integer

5. Elements of a tuple can be accessed in the same way as a list or string using ________.
a. Indexing
b. Slicing
c. Both a) and b) 
d. None of the above

Show Answer тЯ╢
c. Both a) and b)

6. Tuple is __________ data types.
a. Immutable
b. Mutable
c. Both a) and b) 
d. None of the above

Show Answer тЯ╢
a. Immutable

7. Immutable means __________.
a. Tuple cannot be changed after it has been created 
b. Tuple can be changed after it has been created
c. Both a) and b)
d. None of the above

Show Answer тЯ╢
a. Tuple cannot be changed after it has been created

8. Python allows us to join tuples using __________ operator.
a. Assignment
b. Concatenation 
c. Repetition
d. None of the above

Show Answer тЯ╢
b. Concatenation

9. ________ operator can also be used for extending an existing tuple.
a. Assignment
b. Concatenation 
c. Repetition
d. None of the above

Show Answer тЯ╢
b. Concatenation

11. Concatenation operator depicted by symbol ________.
a. тАУ
b. *
c. + 
d. /

Show Answer тЯ╢
c. +

12. Repetition operation is depicted by the symbol ________.
a. тАУ
b. * 
c. +
d. /

Show Answer тЯ╢
b. *

13. ______ operator help to repeat elements of a tuple.
a. Assignment
b. Concatenation
c. Repetition 
d. None of the above

Show Answer тЯ╢
c. Repetition

14. In python, the repetition operator requires the first operand to be a tuple and the second operand to be _________ only.
a. String
b. Decimal
c. Integer 
d. None of the above

Show Answer тЯ╢
c. Integer

15. The ________ operator checks if the element is present in the tuple.
a. In 
b. Not in
c. Out
d. Not Out

Show Answer тЯ╢
a. In

16. The ________ operator returns True if the element is not present in the tuple, else it returns False.
a. In
b. Not in 
c. Out
d. Not Out

Show Answer тЯ╢
b. Not in

17. _________ returns the length or the number of elements of the tuple.
a. tuple()
b. len() 
c. count()
d. index()

Show Answer тЯ╢
b. len()

18. ________ returns the number of times the given element appears in the tuple
a. tuple()
b. len()
c. count() 
d. index()

Show Answer тЯ╢
c. count()

19. _________ returns the index of the first occurrence of the element in the given tuple.
a. tuple()
b. len()
c. count()
d. index() 

Show Answer тЯ╢
d. index()

20. ________ returns minimum or smallest element of the tuple.
a max()
b. min() 
c. sum()
d. None of the above

Show Answer тЯ╢
b. min()

21. ________ returns maximum or largest element of the tuple.
a. max() 
b. min()
c. sum()
d. None of the above

Show Answer тЯ╢
a max()

22. _________ returns sum of the element of the tuple.
a max()
b. min()
c. sum() 
d. None of the above

Show Answer тЯ╢
c. sum()

23. A tuple inside another tuple is called a _______.
a. Tuple Leader
b. Nested Tuple 
c. Inner Tuple
d. None of the above

Show Answer тЯ╢
b. Nested Tuple

24. In python, tuples values are enclosed in _______.
a. Curly brackets
b. Parenthesis 
c. Square brackets
d. None of the above

Show Answer тЯ╢
b. Parenthesis

25. What will be the output of the following code.
str = tuple(тАЬPythonтАЭ)
print(tuple)
a. [тАШPтАЩ, тАШyтАЩ, тАШtтАЩ, тАШhтАЩ, тАШoтАЩ, тАШnтАЩ]
b. (тАШPтАЩ, тАШyтАЩ, тАШtтАЩ, тАШhтАЩ, тАШoтАЩ, тАШnтАЩ) 
c. Python
d. None of the above

Show Answer тЯ╢
b. (тАШPтАЩ, тАШyтАЩ, тАШtтАЩ, тАШhтАЩ, тАШoтАЩ, тАШnтАЩ)

26. Which of the following is not a function of tuple?
a. sum()
b. max()
c. min()
d. delete() 

Show Answer тЯ╢
d. delete()

27. Which of the following belong to tuple?
a. Elements are enclosed in Parenthesis
b. Tuple is immutable
c. Tuple is a sequence data types
d. All of the above 

Show Answer тЯ╢
d. All of the above

28. Which of the following is the correct syntax to declare tuple?
a. t = 1,2,3
b. t = (тАШaтАЩ,тАЩbтАЩ,тАЩcтАЩ)
c. t = (1,2,3)
d. All of the above 

Show Answer тЯ╢
d. All of the above

29. How you can delete tuple with single element?
a. t = 1,
b. t = (1,)
c. Both a) and b) 
d. t = [1]Show Answer тЯ╢

c. Both a) and b)

30. What will be the output of the following code.
t = (30)
type(t)
a. <class тАШfloatтАЩ>
b. <class тАШstringтАЩ>
c. <class тАШintтАЩ> 
d. None of the above

Show Answer тЯ╢
c. <class тАШintтАЩ>

31. What will be the output of the following code.
t1 = (тАШComputerтАЩ, тАШScienceтАЩ)
t2 = (85, 65)
print(t1+t2)
a. (тАШComputerтАЩ, тАШScienceтАЩ, 85, 65) 
b. [тАШComputerтАЩ, тАШScienceтАЩ, 85, 65]
c. {тАШComputerтАЩ, тАШScienceтАЩ, 85, 65}
d. None of the above

Show Answer тЯ╢
a. (тАШComputerтАЩ, тАШScienceтАЩ, 85, 65)

32. Which of the following operator is used to replicate a tuple?
a. Modular
b. Exponent
c. Addition
d. Multiplication 

Show Answer тЯ╢
d. Multiplication

33. What will be the output of the following code.
t = (тАШ1тАЩ, тАШ2тАЩ, тАШ3тАЩ)
print(tuple(тАЬPythonтАЭ) + t)
a. [тАШPтАЩ, тАШyтАЩ, тАШtтАЩ, тАШhтАЩ, тАШoтАЩ, тАШnтАЩ, тАШ1тАЩ, тАШ2тАЩ, тАШ3тАЩ]
b. (тАШPтАЩ, тАШyтАЩ, тАШtтАЩ, тАШhтАЩ, тАШoтАЩ, тАШnтАЩ, тАШ1тАЩ, тАШ2тАЩ, тАШ3тАЩ) 
c. {тАШPтАЩ, тАШyтАЩ, тАШtтАЩ, тАШhтАЩ, тАШoтАЩ, тАШnтАЩ, тАШ1тАЩ, тАШ2тАЩ, тАШ3тАЩ}
d. None of the above

Show Answer тЯ╢
b. (тАШPтАЩ, тАШyтАЩ, тАШtтАЩ, тАШhтАЩ, тАШoтАЩ, тАШnтАЩ, тАШ1тАЩ, тАШ2тАЩ, тАШ3тАЩ)

34. Which of the following python function returns the length of tuple?
a. len() 
b. length()
c. leng()
d. None of the above

Show Answer тЯ╢
a. len()

35. What will be the output of the following code.
t1 = (1, 2, 3)
t2 = (4, 5, 6)
print(t1==t2)
a. True
b. False 
c. No Output
d. None of the above

Show Answer тЯ╢
b. False

36. What will be the output of the following code.
t1 = (1, 2, 3)
t2 = (1, 2, 3)
print(t1 == t2)
a. True 
b. False
c. No Output
d. None of the above

Show Answer тЯ╢
a. True

37. Which of the following function is used to delete the tuple name.
a. del 
b. delete
c. remove
d. None of the above

Show Answer тЯ╢
a. del

38. What will be the output of the following code.
t = (1, 2, 3, 4, 5)
print(max(t))
a. 1
b. 2
c. 4
d. 5 

Show Answer тЯ╢
d. 5

39. What will be the output of the following code.
t = (1, 2, 3, 4, 5)
print(min(t))
a. 1 
b. 2
c. 4
d. 5

Show Answer тЯ╢
a. 1

40. What will be the output of the following code.
t = (1, 2, 3, 4, 5)
print(sum(t))
a. 11 
b. 12
c. 14
d. 15 

Show Answer тЯ╢
d. 15

41. In tuple, which function is used to return the frequency of particular elements.
a. count() 
b. max()
c. min()
d. sum()

Show Answer тЯ╢
a. count()

43. What will be the output of the following code.
t = (тАШComputerтАЩ, тАШScienceтАЩ)
print(max(t))
a. Computer
b. Science 
c. No Output
d. None of the above

Show Answer тЯ╢
b. Science

44. What will be the output of the following code.
t = (1, 2, 3)
print(t[1:3])
a. (1, 2)
b. (2, 3) 
c. (1, 3)
d. None of the above

Show Answer тЯ╢
b. (2, 3)

45. What will be the output of the following code.
t = (1, 2, 3)
print(t[1:-1])
a. (1, )
b. (2, ) 
c. (3, )
d. None of the above

Show Answer тЯ╢
b. (2, )

46. What will be the output of the following code.
t1 = (1, 2, 3)
t2 = (3, 2, 1)
print(t1>t2)
a. True
b. False 
c. No Output
d. None of the above

Show Answer тЯ╢
b. False

47. What will be the output of the following code.
t = (1, 2, 3)
print(sum(t, 3))
a. 3
b. 6
c. 9 
d. No Output

Show Answer тЯ╢
c. 9

48. What will be the output of the following code.
t1 = (1, 2)
t2 = 2 * t1
print(t2)
a. (1, 2, 1, 2) 
b. (1, 2, 2, 2)
c. (1, 1, 1, 2)
d. None of the above

Show Answer тЯ╢
a. (1, 2, 1, 2)

49. What will be the output of the following code.
t = (1, 2) * 3
print(t)
a. [1, 2, 1, 2, 1, 2]
b. (1, 2, 1, 2, 1, 2) 
c. {1, 2, 1, 2, 1, 2}
d. Error

Show Answer тЯ╢
b. (1, 2, 1, 2, 1, 2)

50. What will be the output of the following code.
t1 = (1,2,3)
t2 = slice(1,2)
print(t1[t2])
a. (1, )
b. (2, ) 
c. (3, )
d. None of the above

Show Answer тЯ╢
b. (2, )

51. _________ is a mapping between a set of keys and a set of values.
a. Dictionaries 
b. Tuples
c. List
d. None of the above

Show Answer тЯ╢
a. Dictionaries

52. Dictionary is also known as ________ data type.
a. Mapping 
b. Ordered
c. Both a) and b)
d. None of the above

Show Answer тЯ╢
a. Mapping

53. In dictionaries key-value pair is called an _______.
a. List
b. Item 
c. Value
d. None of the above

Show Answer тЯ╢
b. Item

54. Dictionaries in python are ________.
a. Mutable
b. Non-mutable
c. Both a) and b) 
d. None of the above

Show Answer тЯ╢
c. Both a) and b)

55. What will be the output of the following code.
myDict = {тАЬComputer ScienceтАЭ : 94, тАЬInformation TechnologyтАЭ : 97}
print(myDict)
a. {тАШComputer ScienceтАЩ: 94, тАШInformation TechnologyтАЩ: 97} 
b. (тАШComputer ScienceтАЩ: 94, тАШInformation TechnologyтАЩ: 97)
c. Error
d. None of the above

Show Answer тЯ╢
a. {тАШComputer ScienceтАЩ: 94, тАШInformation TechonologyтАЩ: 97}

56. What will be the output of the following code.
myDict = {тАЬComputer ScienceтАЭ : 94, тАЬInformation TechonologyтАЭ : 97}
myDict1 = {тАЬMathematicsтАЭ : 91, тАЬPhysicsтАЭ : 92}
print(myDict == myDict1)
a. True
b. False 
c. No Output
d. None of the above

Show Answer тЯ╢
b. False

57. The items in dictionaries are __________.
a. Ordered
b. Unordered 
c. Both a) and b)
d. None of the above

Show Answer тЯ╢
b. Unordered

58. In dictionary keys and values are separated by_______.
a. Comma (,)
b. Semicolon (;)
c. Colon (:) 
d. None of the above

Show Answer тЯ╢
c. Colon (:)

59. To create a dictionary, the items entered are separated by _______ and enclosed in ________.
a. Commas and Curly braces 
b. Commas and Round braces
c. Commas and Squair braces
d. None of the above

Show Answer тЯ╢
a. Commas and Curly braces

60. Which of the following function is used to delete an element from dictionary.
a. delete()
b. remove()
c. pop() 
d. None of the above

Show Answer тЯ╢
c. pop()

61. What will be the output of the following code.
myDict = {тАЬComputer ScienceтАЭ : 94, тАЬInformation TechnologyтАЭ : 97}
print(myDict[тАЬComputer ScienceтАЭ])
a. 94 
b. 97
c. тАЬComputer ScienceтАЭ
d. тАЬInformation TechnologyтАЭ

Show Answer тЯ╢
a. 94

62. Keys in dictionary are _________.
a. Immutable 
b. Mutable
c. String
d. None of the above

Show Answer тЯ╢
a. Immutable

63. The keys in the dictionary must be _______ and should be of any ________ data type.
a. Unique and Mutable
b. Unique and Immutable 
c. Repeated and Mutable
d. None of the above

Show Answer тЯ╢
b. Unique and Immutable

64. In dictionary item of a sequence are accessed using a technique called _______.
a. List
b. Indexing 
c. Value
d. None of the above

Show Answer тЯ╢
b. Indexing

65. How we can create an empty dictionary?
a. myDic = ( )
b. myDic = [ ]
c. myDic = { } 
d. None of the above

Show Answer тЯ╢
c. myDic = { }

66. The membership operator ________ checks if the key is present in the dictionary and returns True, else it returns False.
a. In 
b. Not In
c. Not Out
d. None of the above

Show Answer тЯ╢
a. In

67. In which statement traversing can be done in dictionary.
a. Loop statement 
b. If statement
c. Break Statement
d. None of the above

Show Answer тЯ╢
a. Loop statement

68. The ________ operator returns True if the key is not present in the dictionary, else it returns False.
a. In
b. Not In 
c. Not Out
d. None of the above

Show Answer тЯ╢
b. Not In

69. What will be the output of the following code.
myDict = {тАЬComputerтАЭ : 99, тАЬMathematicsтАЭ : 98}
print(myDict)
a. {тАШComputerтАЩ: 99, тАШMathematicsтАЩ: 98} 
b. (тАШComputerтАЩ: 99, тАШMathematicsтАЩ: 98)
c. [тАШComputerтАЩ: 99, тАШMathematicsтАЩ: 98]
d. None of the above

Show Answer тЯ╢
a. {тАШComputerтАЩ: 99, тАШMathematicsтАЩ: 98}

70. The following code is an example of ________.
myDict = {N1 : {тАЬComputerтАЭ : 99, тАЬMathematicsтАЭ : 98}, N2 : {тАЬComputerтАЭ : 99, тАЬMathematicsтАЭ : 98}}
a. Nested Dictionary
b. Dictionary Inside Dictionary
c. Both a) and b) 
d. None of the above

Show Answer тЯ╢
c. Both a) and b)

71. ________ function creates a dictionary from a sequence of key-value pairs.
a. keys()
b. values()
c. dict() 
d. None of the above

Show Answer тЯ╢
c. dict()

72. Which of the following statements used to create dictionary?
a. myDict = {тАЬComputerтАЭ : 99, тАЬMathematicsтАЭ : 98}
b. myDict = {99 : тАЬComputerтАЭ, 98 : тАЬMathematicsтАЭ}
c. myDict = {}
d. All of the above 

Show Answer тЯ╢
d. All of the above

73. ________ function returns a list of keys in the dictionary.
a. keys() 
b. values()
c. dict()
d. None of the above

Show Answer тЯ╢
a. keys()

74. ________ function returns a list of values in the dictionary.
a. keys()
b. values() 
c. dict()
d. None of the above

Show Answer тЯ╢
b. values()

75. _______ function returns a list of tuples(key тАУ value) pair.
a. keys()
b. items() 
c. dict()
d. None of the above

Show Answer тЯ╢
b. items()

76. To delete the dictionary from the memory we use _______ function.
a. update()
b. delete()
c. del() 
d. None of the above

Show Answer тЯ╢
c. del()

77. _______ function deletes or clear all the items of the dictionary.
a. delete()
b. clear() 
c. Both a) and b)
d. None of the above

Show Answer тЯ╢
b. clear()

78. Dictionary keys must be _________.
a. Mutable
b. Unique 
c. Both a) and b)
c. None of the above

Show Answer тЯ╢
b. Unique

79. The data type list is an ordered sequence which is ________ and made up of one or more elements.
a. Mutable 
b. Immutable
c. Both a) and b)
d. None of the above

Show Answer тЯ╢
a. Mutable 

80. Which statement from the list below will be create a new list?
a. new_l = [1, 2, 3, 4]
b. new_l = list()
c. Both a) and b) 
d. None of the above

Show Answer тЯ╢
c. Both a) and b) 

81. List can content __________.
a. Integer
b. Float
c. String & Tuple
d. All of the above 

Show Answer тЯ╢
d. All of the above 

82. list are enclosed in square ________ and are separated by _________.
a. Brackets and comma 
b. Brackets and dot
c. Curli Brackets and dot
d. None of the above

Show Answer тЯ╢
a. Brackets and comma 

83. List elements may be of the following data types.
a. Different data types 
b. Same data types
c. Both a) and b)
d. None of the above

Show Answer тЯ╢
a. Different data types

84. In Python, lists are mutable. It means that ________.
a. The contents of the list can be changed after it has been created 
b. The contents of the list canтАЩt changed after it has been created
c. The list cannot store the number data type.
d. None of the above

Show Answer тЯ╢
a. The contents of the list can be changed after it has been created 

85. What will be the output of the following python code
print(list(тАЬPythonтАЭ))
a. (тАШPтАЩ, тАШyтАЩ, тАШtтАЩ, тАШhтАЩ, тАШoтАЩ, тАШnтАЩ)
b. [тАШPтАЩ, тАШyтАЩ, тАШtтАЩ, тАШhтАЩ, тАШoтАЩ, тАШnтАЩ] 
c. (тАЬPтАЭ, тАЬyтАЭ, тАЬtтАЭ, тАЬhтАЭ, тАЬoтАЭ, тАЬnтАЭ)
d. [тАЬPтАЭ, тАЬyтАЭ, тАЬtтАЭ, тАЬhтАЭ, тАЬoтАЭ, тАЬnтАЭ]Show Answer тЯ╢

b. [тАШPтАЩ, тАШyтАЩ, тАШtтАЩ, тАШhтАЩ, тАШoтАЩ, тАШnтАЩ] 

86. The data type list allows manipulation of its contents through ________.
a. Concatenation
b. Repetition
c. Membership
d. All of the above 

Show Answer тЯ╢
d. All of the above

87. Python allows us to join two or more lists using __________ operator.
a. Concatenation 
b. Repetition
c. Membership
d. All of the above

Show Answer тЯ╢
a. Concatenation 

88. What will be the output of the following python code
new_list = [тАШPтАЩ,тАЩyтАЩ,тАЩtтАЩ,тАЩhтАЩ,тАЩoтАЩ,тАЩnтАЩ]
print(len(new_list))
a. 6 
b. 7
c. 8
d. 9

Show Answer тЯ╢
a. 6 

89. Example of concatenation operator _______.
a. тАУ
b. + 
c. /
d. *

Show Answer тЯ╢
b. + 

90. If we try to concatenate a list with elements of some other data type, _________ occurs.
a. Runtime Error
b. Type Error 
c. Result
d. None of the above

Show Answer тЯ╢
b. Type Error 

91. Python allows us to replicate a list using repetition operator depicted by symbol _________.
a. тАУ
b. +
c. /
d. * 

Show Answer тЯ╢
d. * 

92. Like strings, the membership operators _________ checks if the element is present in the list and returns True, else returns False.
a. In
b. Out
c. Listin
d. None of the above

Show Answer тЯ╢
a. In

93. We can access each element of the list or traverse a list using a _______.
a. For loop
b. While loop
c. Both a) and b) 
d. None of the above

Show Answer тЯ╢
c. Both a) and b)

94. _________ returns the length of the list passed as the argument.
a. len() 
b. length()
c. leth()
d. None of the above

Show Answer тЯ╢
a. len()

95. ________ creates an empty list if no argument is passed.
a. len()
b. list() 
c. append()
d. extend()

Show Answer тЯ╢
b. list()

96. ________ a single element passed as an argument at the end of the list.
a. append() 
b. extend()
c. insert()
d. None of the above

Show Answer тЯ╢
a. append() 

97. Which of the following command is used to add an element in list?
a. new_list.add(5)
b. new_list.added(5)
c. new_list.append(5) 
d. All of the above

Show Answer тЯ╢
c. new_list.append(5) 

98. _________ returns the number of times a given element appears in the list.
a. insert()
b. index()
c. count() 
d. None of the above

Show Answer тЯ╢
c. count() 

99. _________ returns index of the first occurrence of the element in the list. If the element is not present, ValueError is generated.
a. insert()
b. index() 
c. count()
d. None of the above

Show Answer тЯ╢
b. index() 

100. ________ function removes the given element from the list. If the element is present multiple times, only the first occurrence is removed.
a. delete()
b. rem()
c. remove() 
d. None of the above

Show Answer тЯ╢
c. remove() 

101. _______ function returns the element whose index is passed as parameter to this function and also removes it from the list.
a. push()
b. remove()
c. pop() 
d. None of the above

Show Answer тЯ╢
c. pop() 

102. What will be the output of the following python code.
new_list = [9, 8, 7]
print(sum(new_list))
a. 22
b. 23
c. 24 
d. 25

Show Answer тЯ╢
c. 24 

103. What will be the output of the following python code.
new_list = [9, 8, 7]
print(min(new_list))
a. 9
b. 8
c. 7 
d. None of the above

Show Answer тЯ╢
c. 7

Computer Science Class 11 MCQs

Disclaimer: We have taken an effort to provide you with the accurate handout of тАЬMCQ on List Tuple and Dictionary in PythonтАЬ. If you feel that there is any error or mistake, please contact me at anuraganand2017@gmail.com. The above CBSE study material present on our websites is for education purpose, not our copyrights. All the above content and Screenshot are taken from Computer Science Class 11 NCERT Textbook and CBSE Support Material which is present in CBSEACADEMIC website, This Textbook and Support Material are legally copyright by Central Board of Secondary Education. We are only providing a medium and helping the students to improve the performances in the examination.┬а

Images and content shown above are the property of individual organizations and are used here for reference purposes only.

For more information, refer to the official CBSE textbooks available at cbseacademic.nic.in

Leave a Comment