Quiz on Python Functions
We offer you a brighter future with FREE online courses - Start Now!!
Quiz Summary
0 of 15 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 15 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 15
1. Question
- Which of the following is true about user- defined functions in Python?
CorrectIncorrect -
Question 2 of 15
2. Question
- Which of the following is not a user-defined function?
CorrectIncorrect -
Question 3 of 15
3. Question
What is the default value of a function?
CorrectIncorrect -
Question 4 of 15
4. Question
- Which of the following commands can be used to access the docstring of a function?
CorrectIncorrect -
Question 5 of 15
5. Question
Find the output of the following code?
def func():
print(‘Hi’)CorrectIncorrect -
Question 6 of 15
6. Question
- Which of the following is the correct syntax to return value from a function?
CorrectIncorrect -
Question 7 of 15
7. Question
Find the output of the following code?
def func(n):
print(n**2,end=” “)
func(4)
print(n)CorrectIncorrect -
Question 8 of 15
8. Question
- Which of the following is the correct way to write a lambda function?
CorrectIncorrect -
Question 9 of 15
9. Question
Find the output of the following code?
def func(a,b):
print(a-b)
a=4
b=9
func(a=b,b=a)CorrectIncorrect -
Question 10 of 15
10. Question
Find the output of the following code?
def func(c):
if(c in ‘aeiou’):
return c
return “end”
func(‘i’)CorrectIncorrect -
Question 11 of 15
11. Question
- Which of the following is the correct syntax to define a function with variable length arguments?
CorrectIncorrect -
Question 12 of 15
12. Question
Find the output of the following code?
def fun(x,y=0,z):
print(x-y+z)
fun(1,23)CorrectIncorrect -
Question 13 of 15
13. Question
- Which of the following statements can be used to define an empty function?
CorrectIncorrect -
Question 14 of 15
14. Question
Find the output of the following code?
def fun(lst):
def func(n):
s=0
for i in range(0,n+1):
s=s+lst[i]
return s
for i in range(len(lst)):
print(func(i),end=’ ‘)
fun([1,3,5])CorrectIncorrect -
Question 15 of 15
15. Question
- Which of the following finds the minimum of a list?
CorrectIncorrect