Quiz on Data Structures in Python
Whenever we learn any programming language, the major focus is given to data structures. The main reasons for learning data structures are to simplify the programming experience. With the help of the data structure, we can design large scalable systems which can be put to industrial use.
Let us now move ahead and check out conceptual knowledge of Data Structures in Python. All the Best!
0 of 15 Questions completed
Questions:
Information You have already completed the quiz before. Hence you can not start it again.
You must sign in or sign up to start the quiz.
You must first complete the following:
Quiz complete. Results are being recorded.
0 of 15 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0 )
Earned Point(s): 0 of 0 , (0 ) 0 Essay(s) Pending (Possible Point(s): 0 )
Current Review / Skip Answered Correct Incorrect
Question 1 of 15
Which of the following is a user-generated data structure in Python?
Question 2 of 15
Which of the following doesn’t allow random fetching if the index is known?
Question 3 of 15
Which of the following are inbuilt Python data structures?
Question 4 of 15
Which of the following data structures in python are immutable?
Question 5 of 15
Which of the following is not a method used to traverse a tree?
Question 6 of 15
Identify the data structure which is being used in the code given below? # Code starts
org = ‘QuizOrbit’ org = list(org)
print(len(org))
# Code Ends
Question 7 of 15
Which data structure is being put to use in the code given below?
# Code starts
org = ‘QuizOrbit’
count = {}
for i in org:
if i in count:
count[i]+=1
else:
count[i]=1
print(count)
# Code Ends
Question 8 of 15
What is the output of the following python code snippet? # Code starts
emp1 = (‘Ajay’,25,10000) emp2 = (‘Sidhi’,23,15000)
emp1[2] = 20000
print(emp1[2]+emp2[2])
# Code Ends
Question 9 of 15
Identify the line number where the code runs into an error?
# Code starts
org = ‘QuizArbit’
org[4] = ‘O’
org = list(org)
if len(org) == len(‘QuizOrbit’):
print(‘Best Quiz Platform’)
else:
print(‘Exiting!’)
# Code Ends
Question 10 of 15
Which data structure is the output of the code given below? # Code starts
col = (2,4,6,3,5,8,7,6,4,3,0,9) l = list(col)
finalAns = list(set(col)) print(type(finalAns))
# Code Ends
Question 11 of 15
What is the time complexity of the following piece of code? # Code starts
org = ‘QuizOrbit’ print(org.find(‘i’))
# Code Ends
Question 12 of 15
What is the time complexity of the code given below?
# Code starts
l = []
for i in range(n):
l.append(i)
l.reverse()
print(l)
# Code Ends
Question 13 of 15
Identify the data structure we use in the code given below? # Code starts
asthetic1 = ‘quizOrbit’ asthetic2 = ‘QuizOrbit’
print(asthetic1!=asthetic2)
# Code Ends
Question 14 of 15
Find the output of the code given below? # Code starts
content = (21, 26, 37, 94) content.append( (75, 62, 79) ) print(len(content))
# Code Ends
Question 15 of 15
Predict the output of the code given below? # Code starts
collection1 = (‘QuizOrbit’, ‘Meha’ , 26 , ‘India’) collection2 = (‘QuizOrbit’, ‘Divika’ , 23 , ‘India’) print(collection1 > collection2)
# Code Ends
Summary We hope with this Python Quiz you all might have got a clear picture of your understanding of Data Structures in Python. If you scored low, we would suggest you revise the topic again and reattempt the quiz. Make sure to clear all your doubts and strengthen your concepts before you move ahead. Happy Learning!
Tags: Python Data Structures quiz python quiz
It is very useful