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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What will be the output of the following code? "'pythondef remainder(a, b):return a % bresult = remainder(10, 3)print(result) "'
2. What is the purpose of using lambda functions in Python?
3. How does a function differ from a subroutine?
4. How can you convert a string to lowercase?
5. Def aver(a, b, c=10):return (a+b+c)/3requires ..... arguments compulsorily
6. What is the output of the following code? def display():print('program'); display()
7. Richa is working with a program where she gave some values to the function. She doesn't know the term to relate these values. Select the correct option.
8. What does the max() function in Python do?
9. What will be the output of the following code? "'pythondef divide(a, b):return a / bresult = divide(8, 2)print(result) "'
10. What is the syntax for a function with variable-length arguments?
11. Function randint() is available under which module of python?
12. Which of the following statements is true about calling functions in Python?
13. Which of the following is a correct way to document a function in Python?
14. In which part of memory does the system stores the parameter and local variables of function call
15. A function definition has ..... number of parts
16. Function header in Python contains .....
17. Assertion (A):A function is a block of organized and reusable code that is used to perform a single, related action. Reason (R):Function provides better modularity by your application and a high degree of code reusability.
18. Which of the given argument types can be skipped from a function call?
19. Which of the following keywords marks the begining of the function block?
20. What is string interpolation?
21. What type of arguments in a function call require the number of formal parameters to match the number of actual parameters?
22. Every function returns a value; if a function does not explicitly return a value, then it will return .....
23. In the range(start, stop, step) function, what does the 'stop' parameter indicate?
24. A(n) ..... is a special variable that receives a piece of data when a function is called.
25. In Python, what is the correct way to define a function?