Top 1000+ Solved Problem Solving and Python Programming MCQ Questions Answer

From 421 to 435 of 820

Q. printMax(3, 4)

a. 3

b. 4

c. 4 is maximum

d. none of the mentioned

  • c. 4 is maximum

Q. print(maximum(2, 3))

a. 2

b. 3

c. the numbers are equal

d. none of the mentioned

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

  • 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

  • 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

  • b. built-in function & user defined function

Q. Where is function defined?

a. module

b. class

c. another function

d. all of the mentioned

  • d. all of the mentioned

Q. What is called when a function is defined inside a class?

a. module

b. class

c. another function

d. method

  • d. method

Q. Which of the following refers to mathematical function?

a. sqrt

b. rhombus

c. add

d. rhombus

  • a. sqrt

Q. print x

a. 9

b. 3

c. 27

d. 30

  • c. 27

Q. print z(8)

a. 48

b. 14

c. 64

d. none of the mentioned

  • a. 48

Q. Does Lambda contains return statements?

a. true

b. false

  • b. false

Q. Lambda is a statement.

a. true

b. false

  • b. false

Q. Lambda contains block of statements.

a. true

b. false

  • b. false

Q. f(2, 30, 400)

a. 432

b. 24000

c. 430

d. no output

  • a. 432

Q. who('Arthur')

a. arthur sir

b. sir arthur

c. arthur

d. none of the mentioned

  • b. sir arthur
Subscribe Now

Get All Updates & News