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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the lifetime of a variable defined inside a function?
2. Which of the following is the correct way to handle errors in a Python function?
3. Parameters in a function are like:
4. ..... is the built-in function to know the type of a variable or function.
5. What is the syntax to define a function in Python?
6. These are predefined functions that are always available for use. For using them we don't need to import any module.
7. Which of the following is a valid lambda function that returns the square of a number?
8. What function is used to find the length of a string?
9. What does the randint function do?
10. Which of the following is a keyword used to define a function in Python?
11. How do you use a lambda function with the filter() function in Python?
12. Which of the following is NOT a reason to use functions?
13. Which of these statements about a function is correct?
14. What is the default behavior of the sort() method?
15. Def Fun ..... love(a, 20):print(a+20)is
16. How can you use a lambda function to sort a list of tuples by the second element?
17. If the return statement is not used in the function then which type of value will be returned by the function?
18. Which operator is used to check if a value exists in a sequence?
19. Which of the following cannot be converted in a recursion function?
20. The default value for a parameter is defined in function ..... ?
21. Which statement is correct to import all modules from the package
22. How do you print 'Hello' five times using a for loop?
23. Assertion (A):Built in function are predefined in the language that are used directly. Reason (R):print() and input() are built in functions.
24. What does the append() method do in Python lists?
25. Parameters are the (a) used in the function definition.