Class 11 Computer Science Chapter 5 Functions In Python Quiz 12 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. Calling a function and defining a function mean the same thing.
2. What is the syntax of a lambda function in Python?
3. What is the purpose of the 'join()' method in strings?
4. How can you modify a global variable inside a function?
5. What is a variable defined outside all the function referred to as?
6. What will the following code output:for i in range(5, 10):print(i)?
7. What does the special value None indicate when returned from a function?
8. Def mul ..... fun(a=10, b, c=1):return a+b+cis
9. What is the purpose of the input function in the sums() function?
10. What is the output of the following piece of code?def test(i, j):if(i==0):return j else:return test(i-1, i+j) print(test(4, 7))
11. What is a lambda function in Python?
12. What is the default return value of a function that does not explicitly return a value?
13. What is the purpose of the 'continue' statement in Python?
14. What is the correct way to define a function that takes no parameters?
15. What is the default step size in Python if it is not provided?
16. What will be the output of the following Python expression? round(4.576)
17. The function randint( ) returns random integers between low and high numbers?
18. How do you format a string using f-strings?
19. The variable declared outside a function is called a global variable.
20. What is the output of the following code? def draw ..... circle():circle(50); draw ..... circle()
21. What is the difference between print() and return in a function?
22. In which part of memory does the system store the parameters and local variables of a function call?
23. What are the benefits of using functions?
24. What will happen if you call a function with fewer arguments than it requires and no default values are set?
25. Which type of function definition allows specifying default values in the function header?