adplus-dvertising

Welcome to the Dictionary and Built in Functions MCQs Page

Dive deep into the fascinating world of Dictionary and Built in Functions with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Dictionary and Built in Functions, a crucial aspect of Python. In this section, you will encounter a diverse range of MCQs that cover various aspects of Dictionary and Built in Functions, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Python.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Dictionary and Built in Functions. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Python.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Dictionary and Built in Functions. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Dictionary and Built in Functions MCQs | Page 10 of 13

Q91.
What is the output of the following code?
>>> a={"a":1,"b":2,"c":3}
>>> b=dict(zip(a.values(),a.keys()))
>>> b
Discuss
Answer: (d).{1: ‘a’, 2: ‘b’, 3: ‘c’}
Discuss
Answer: (d).{0: ‘0’, 1: ‘1’, 2: ‘2’, 3: ‘3’, 4: ‘4’}
Q93.
What is the output of the following piece of code when executed in Python shell?
>>> a=dict()
>>> a[1]
Discuss
Answer: (a).An exception is thrown since the dictionary is empty
Q94.
What is the output of the expression?
round(4.5676,2)?
Discuss
Answer: (c).4.57
Q95.
What is the output of the following function?
any([2>8, 4>2, 1>2])
Discuss
Answer: (b).True
Q96.
What is the output of the function shown below?
import math
abs(math.sqrt(25))
Discuss
Answer: (d).5.0
Q97.
What are the outcomes of the functions shown below?
sum(2,4,6)
sum([1,2,3])
Discuss
Answer: (a).Error, 6
Q98.
What is the output of the function:
all(3,0,4.2)
Discuss
Answer: (c).Error
Q99.
What is the output of the functions shown below?
min(max(False,-3,-4), 2,7)
Discuss
Answer: (b).False
Q100.
What is the output of the functions shown below?
divmod(10.5,5)
divmod(2.4,1.2)
Discuss
Answer: (c).(2.0, 0.5)
(2.0, 0.0)

Suggested Topics

Are you eager to expand your knowledge beyond Python? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!