Top 1000+ Solved Problem Solving and Python Programming MCQ Questions Answer
Q. Which of the following is a feature of DocString?
a. provide a convenient way of associating documentation with python modules, functions, classes, and methods
b. all functions should have a docstring
c. docstrings can be accessed by the doc attribute on objects
d. all of the mentioned
Q. Which are the advantages of functions in python?
a. reducing duplication of code
b. decomposing complex problems into simpler pieces
c. improving clarity of the code
d. all of the mentioned
Q. What are the two main types of functions?
a. custom function
b. built-in function & user defined function
c. user function
d. system function
Q. What is called when a function is defined inside a class?
a. module
b. class
c. another function
d. method