Quiz
Multiple Choice Questions - Functions
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (11)
1Which keyword is use for function?.
- Adefine
- Bfun
- Cdef
- Dfunction
2Which of the following items are present in the function header?.
- Afunction name
- Bparameter list
- Creturn value
- DBoth A and B
3If return statement is not used inside the function, the function will return:.
- ANone
- B0
- CNull
- DArbitary value
4Which of the following function headers is correct?.
- Adef fun(a = 2, b = 3, c)
- Bdef fun(a = 2, b, c = 3)
- Cdef fun(a, b = 2, c = 3)
- Ddef fun(a, b, c = 3, d)
5Which of the following is the use of function in python?
- AFunctions are reusable pieces of programs
- BFunctions don’t provide better modularity for your application
- Cyou can’t also create your own functions
- DAll of the mentioned
6Which of the following is a feature of DocString?
- AProvide a convenient way of associating documentation with Python modules, functions, classes, and methods
- BAll functions should have a docstring
- CDocstrings can be accessed by the __doc__ attribute on objects
- DAll of the mentioned
7What is the default return value for a function that does not return any value explicitly?
- ANone
- Bint
- Cdouble
- Dpublic
- Enull
8Which of the following items are present in the function header?
- Afunction name
- Bfunction name and parameter list
- Cparameter list
- Dreturn value
9Which of the following enclose the input parameters or arguments of a function?
- Abrackets
- Bparentheses
- Ccurly braces
- Dquotation marks
10What 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)- A5 7
- B3 9
- C10 12
- DError
11print type(type(int))
- Atype 'int'
- Btype 'type'
- CError
- D0
Information
- Description
- Quiz on Multiple Choice Questions - Functions, created by Aparna Dhirde on 15/03/2020.
- Author
- Aparna Dhirde
- Language
- English
- Views
- 120
- Tags
- Rating
- No ratings yet Rate this quiz