This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 5 Functions In Python – Quiz 17 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 5 Functions In Python Quiz 17 (22 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Divya wants to print the identity of the object used in the function. Which of the following functions is used to print the same? A) Identity(). B) Ide(). C) Id(). D) Idy(). Show Answer Correct Answer: C) Id(). 2. Which of the following describes a user-defined function? A) Created by the user. B) Part of the Python library. C) None of the above. D) Automatically generated. Show Answer Correct Answer: A) Created by the user. 3. Which of the following is true about the 'not in' operator? A) Checks if a value is present in a sequence. B) Checks if a value is not present in a sequence. C) Is used to define a loop. D) Is used to create a function. Show Answer Correct Answer: B) Checks if a value is not present in a sequence. 4. What is the name given to that area of memory, where the system stores the parameters and local variables of a function call? A) A heap. B) Storage area. C) A stack. D) An array. Show Answer Correct Answer: C) A stack. 5. What is the output of the following code? "'pythondef greet():return "Hello!"print(greet()) "' A) 'greet'. B) 'Hello!'. C) 'None'. D) 'print'. Show Answer Correct Answer: B) 'Hello!'. 6. What is the syntax for calling a function in Python? A) FunctionName\{\};. B) FunctionName[]. C) FunctionName\{\}. D) Function name(). Show Answer Correct Answer: D) Function name(). 7. What is a standard module in Python? A) A standard module is a user-defined module. B) A standard module is a third-party library. C) A standard module is a type of Python script. D) A standard module in Python is a module included in the Python standard library. Show Answer Correct Answer: D) A standard module in Python is a module included in the Python standard library. 8. Which type of function is a separate file containing functions and variables? A) Built-in Functions. B) Modules. C) User-defined Functions. D) Pre-defined Functions. Show Answer Correct Answer: B) Modules. 9. For a function header as follows:def Calc(X, Y = 20):Which of the following function calls will give an error? A) Calc(15, 25). B) Calc(X = 15, Y = 25). C) Calc(X = 25). D) Calc(Y = 25). Show Answer Correct Answer: D) Calc(Y = 25). 10. What does the 'return' statement in a function allow you to do? A) Terminate the function execution. B) Return a value or an expression. C) Print a value to the console. D) Define a new variable. Show Answer Correct Answer: B) Return a value or an expression. 11. What will the following code output? def greet(name):print('Hello', name); greet('Alice') A) Error. B) Hello Alice. C) Hello. D) Alice. Show Answer Correct Answer: B) Hello Alice. 12. Which of the following is a valid way to pass parameters to a function in Python? A) 'def myFunction(x, y):'. B) 'def myFunction[x, y]:'. C) 'def myFunction\{x, y\}:'. D) 'def myFunction:'. Show Answer Correct Answer: A) 'def myFunction(x, y):'. 13. Function sqrt() is available under which module of python? A) Random. B) Math. C) Statistics. D) None of the above. Show Answer Correct Answer: B) Math. 14. How can you create a copy of a list in Python? A) List.copy(). B) Copy(). C) Copy.list(). D) List.clone(). Show Answer Correct Answer: A) List.copy(). 15. What will be printed by the following code? "'pythondef print ..... message(msg):print(msg)result = print ..... message("Hello, Year 11!")print(result) "' A) 'Hello, Year 11!' followed by 'None'. B) 'Hello, Year 11!' followed by 'Hello, Year 11!'. C) 'None' only. D) 'Hello, Year 11!' only. Show Answer Correct Answer: A) 'Hello, Year 11!' followed by 'None'. 16. Which is the most appropriate definition for recursion? A) A function that calls itself. B) A function execution instance that calls another execution instance of the same function. C) A class method that calls another class method. D) An in-built method that is automatically called. Show Answer Correct Answer: B) A function execution instance that calls another execution instance of the same function. 17. A(n) ..... is the part of a program in which a variable may be accessed. A) Loop. B) Scope. C) Area of visibility. D) Declaration space. Show Answer Correct Answer: B) Scope. 18. Which function is called anonymous unnamed function A) Lambda. B) Recursion. C) Function. D) Define. Show Answer Correct Answer: A) Lambda. 19. Can a lambda function have multiple arguments in Python? A) Yes. B) Only if it is defined as a named function. C) Sometimes. D) No. Show Answer Correct Answer: A) Yes. 20. The values being passed through function-call statements are called ..... A) Arguments. B) Parameter. C) Values. D) None. Show Answer Correct Answer: A) Arguments. 21. When a variable is inside of a function what do you call its scope? A) Static. B) Local. C) Global. D) Boolean. Show Answer Correct Answer: B) Local. 22. If you want to remove and return the last element of a list, which method would you use? A) Index(). B) Clear(). C) Pop(). D) Remove(). Show Answer Correct Answer: C) Pop(). ← PreviousRelated QuizzesClass 11 Computer Science Chapter 5 Functions In Python Quiz 1Class 11 Computer Science Chapter 5 Functions In Python Quiz 2Class 11 Computer Science Chapter 5 Functions In Python Quiz 3Class 11 Computer Science Chapter 5 Functions In Python Quiz 4Class 11 Computer Science Chapter 5 Functions In Python Quiz 5Class 11 Computer Science Chapter 5 Functions In Python Quiz 6Class 11 Computer Science Chapter 5 Functions In Python Quiz 7Class 11 Computer Science Chapter 5 Functions In Python Quiz 8Class 11 Computer Science Chapter 5 Functions In Python Quiz 9Class 11 Computer Science Chapter 5 Functions In Python Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books