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

From 781 to 795 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. 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 is the use of id() function in python?

a. id returns the identity of the object

b. every object doesn’t have a unique id

c. all of the mentioned

d. none of the mentioned

  • a. id returns the identity of the object

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. Python supports the creation of anonymous functions at runtime, using a construct called

a. lambda

b. pi

c. anonymous

d. none of the mentioned

  • a. lambda

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
Subscribe Now

Get All Updates & News