This Quiz contains totally 10 Questions each carry 1 point for you.
1.From the below following items select the one which is present in the function header?
function name
function name and parameter list
parameter list
return value
Correct!
Wrong!
2.Which keyword is used for function?
Fun
Define
Def
Function
Correct!
Wrong!
3.Select the right function declaration of fun1() so that we can run the below function call successfully
fun1(25, 75, 55)
fun1(10, 20)
def fun1(**kwargs)
No, it is not possible in Python
def fun1(args*)
def fun1(*data)
Correct!
Wrong!
4.Which of the following function headers is right one?
def f(p = 1, q):
def f(p = 1, q, r = 2):
def f(p = 1, q = 1, r = 2):
def f(p = 1, q = 1, r = 2, d):
Correct!
Wrong!
5.Where is function defined?
Module
Class
Another function
All of the mentioned
Correct!
Wrong!
6.What’s the value of x for the below code snippet?
x = 0
while x < 10:
x = x + 1
11
9
10
0
Correct!
Wrong!
7.Python function always returns a value
True
False
Correct!
Wrong!
8.When a function is defined inside a class, what is called from below options?
Module
Class
Another function
Method
Correct!
Wrong!
9.If inside the function return statement is not used, the function will return?
None
0
Null
Arbitary value
Correct!
Wrong!
10.Which of the following is the use of id() function in python?
Id() returns the size of object.
Id() returns the identity of the object.
Both A and B
None of the above
Correct!
Wrong!
Share the quiz to show your results !
Subscribe to see your results
Ignore & go to results
Python-Functions-Quiz
You got %%score%% of %%total%% right
%%description%%
%%description%%
Loading...