Question 1: Pick odd one in connection with collection data type.
A) List
B) Tuple
C) Dictionary
D) Loop
Question 2: Let list1=[2,4,6,8,10],then print(list1[-2]) will result in
A)10
B) 8
C) 4
D) 6
Question 3: Which of the following function is used to count the number of elements in a list?
A) count ()
B) find ()
C) len()
D) index ()
Question 4: If List=[10,20,30,40,50],then List[2]=35 will result
A) [35,10,20,30,40,50]
B) [10,20,30,40,50,35]
C) [10,20,35,40,50]
D) [10,35,30,40,50]
Question 5: If List=[17,23,41,10], then List.append(32) will result
A) [32,17,23,41,10]
B) [17,23,41,10,32]
C) [10,17,23,32,41]
D) [41,32,23,17,10]
Question 6: Which of the python function can be used to add more than one element within an existing list?
A) append()
B) append_more()
C) extend()
D) more()
Question 7: What will be the result of the following python code?
S=[x**2 for x in range(5)]
print(S)
A) [0,1,2,4,5]
B) [0,1,4,9,16]
C) [0,1,4,9,16,25]
D) [1,4,9,16,25]
Question 8: What is the use of type() function in python?
A) To create a tuple
B) To know the type of the element in tuple
C) To know the data type of python object
D) To create a list
Question 9: Which of the following statement is not correct?
A) A list is mutable
B) A tuple is immutable
C) The append() function is use to add an element
D) The extend() function is used in tuple to add an element in a list
Question 10: Let setA={3,6,9},setB={1,3,9}. What will be the result of the following snippet?
print(setA|setB)
A) {3,6,9,1,3,9}
B) {3,9}
C) {1}
D) {1,3,6,9}
Question 11: Which of the following set operation includes all the elements that are in two sets but not the one that are common to two sets?
A) Symmetric difference
B) Difference
C) Intersection
D) Union
Question 12: The keys in python, dictionary is specified by
A) =
B) ;
C) +
D) :
Report Card
Total Questions Attempted: 0
Correct Answers: 0
Wrong Answers: 0
Percentage: 0%
0 Comments
Hero Studies Is Not Responsible For The Comments Here & From You.
Hero Studies Has Rights To Remove/Delete The Comments Here