Zusammenfassung der Ressource
Frage 1
Frage
Which keyword is use for function?.
Frage 2
Frage
Which of the following items are present in the function header?.
Antworten
-
function name
-
parameter list
-
return value
-
Both A and B
Frage 3
Frage
If return statement is not used inside the function, the function will return:.
Antworten
-
None
-
0
-
Null
-
Arbitary value
Frage 4
Frage
Which of the following function headers is correct?.
Antworten
-
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)
Frage 5
Frage
Which of the following is the use of function in python?
Antworten
-
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
Frage 6
Frage
Which of the following is a feature of DocString?
Antworten
-
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
Frage 7
Frage
What is the default return value for a function that does not return any value explicitly?
Antworten
-
None
-
int
-
double
-
public
-
null
Frage 8
Frage
Which of the following items are present in the function header?
Frage 9
Frage
Which of the following enclose the input parameters or arguments of a function?
Antworten
-
brackets
-
parentheses
-
curly braces
-
quotation marks
Frage 10
Frage
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)
Frage 11
Frage
print type(type(int))
Antworten
-
type 'int'
-
type 'type'
-
Error
-
0