# What will be the output of the following Python code def maximum(x, y): if x > y: return x elif x == y: return 'The numbers are equal' else: return y print(maximum(2, 3))

1.  2

2.  3

3.  The numbers are equal

4.  The numbers are equal

4

3

Explanation :
No Explanation available for this question

# Which of the following is a feature of DocString

1.  Provide a convenient way of associating documentation with Python modules, functions, classes, and methods

2.  All functions should have a docstring

3.  Docstrings can be accessed by the __doc__ attribute on objects

4.  All of the mentioned

4

All of the mentioned

Explanation :
No Explanation available for this question

# Which are the advantages of functions in python

1.  Reducing duplication of code

2.  Decomposing complex problems into simpler pieces

3.  Improving clarity of the code

4.  All of the mentioned

4

All of the mentioned

Explanation :
No Explanation available for this question

# What are the two main types of functions

1.  Custom function

2.  Built-in function & User defined function

3.  User function

4.  System function

4

Built-in function & User defined function

Explanation :
No Explanation available for this question

# Where is function defined

1.  Module

2.  Class

3.  Another function

4.  All of the mentioned

4

All of the mentioned

Explanation :
No Explanation available for this question

# What is called when a function is defined inside a class

1.  Module

2.  Class

3.  Another function

4.  Method

4

Method

Explanation :
No Explanation available for this question

# Which of the following is the use of id() function in python

1.  Id returns the identity of the object

2.  Every object doesn’t have a unique id

3.  All of the mentioned

4.  None of the mentioned

4

Id returns the identity of the object

Explanation :
No Explanation available for this question

# Which of the following refers to mathematical function

1.  sqrt

2.  rhombus

4.  rhombus

4

sqrt

Explanation :
No Explanation available for this question

# What will be the output of the following Python code def cube(x): return x * x * x x = cube(3) print x

1.  9

2.  3

3.  27

4.  30

4

27

Explanation :
No Explanation available for this question

# What will be the output of the following Python code def C2F(c): return c * 9/5 + 32 print C2F(100) print C2F(0)

1.  21232

2.  31424

3.  56798

4.  None of the mentioned

4