Aparna Dhirde
Quiz von , erstellt am more than 1 year ago

Quiz am Multiple Choice Questions - Functions, erstellt von Aparna Dhirde am 15/03/2020.

110
0
0
Aparna Dhirde
Erstellt von Aparna Dhirde vor mehr als 4 Jahre
Schließen

Multiple Choice Questions - Functions

Frage 1 von 11

1

Which keyword is use for function?.

Wähle eine der folgenden:

  • define

  • fun

  • def

  • function

Erklärung

Frage 2 von 11

1

Which of the following items are present in the function header?.

Wähle eine der folgenden:

  • function name

  • parameter list

  • return value

  • Both A and B

Erklärung

Frage 3 von 11

1

If return statement is not used inside the function, the function will return:.

Wähle eine der folgenden:

  • None

  • 0

  • Null

  • Arbitary value

Erklärung

Frage 4 von 11

1

Which of the following function headers is correct?.

Wähle eine der folgenden:

  • def fun(a = 2, b = 3, c)

  • def fun(a = 2, b, c = 3)

  • def fun(a, b = 2, c = 3)

  • def fun(a, b, c = 3, d)

Erklärung

Frage 5 von 11

1

Which of the following is the use of function in python?

Wähle eine der folgenden:

  • Functions are reusable pieces of programs

  • Functions don’t provide better modularity for your application

  • you can’t also create your own functions

  • All of the mentioned

Erklärung

Frage 6 von 11

1

Which of the following is a feature of DocString?

Wähle eine der folgenden:

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

  • All functions should have a docstring

  • Docstrings can be accessed by the __doc__ attribute on objects

  • All of the mentioned

Erklärung

Frage 7 von 11

1

What is the default return value for a function that does not return any value explicitly?

Wähle eine der folgenden:

  • None

  • int

  • double

  • public

  • null

Erklärung

Frage 8 von 11

1

Which of the following items are present in the function header?

Wähle eine der folgenden:

  • function name

  • function name and parameter list

  • parameter list

  • return value

Erklärung

Frage 9 von 11

1

Which of the following enclose the input parameters or arguments of a function?

Wähle eine der folgenden:

  • brackets

  • parentheses

  • curly braces

  • quotation marks

Erklärung

Frage 10 von 11

1

What will be the output of the following Python code?.
def function1(var1=5, var2=7):
var2=9
var1=3
print (var1, " ", var2)
function1(10,12)

Wähle eine der folgenden:

  • 5 7

  • 3 9

  • 10 12

  • Error

Erklärung

Frage 11 von 11

1

print type(type(int))

Wähle eine der folgenden:

  • type 'int'

  • type 'type'

  • Error

  • 0

Erklärung