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