This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 67 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 67 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. This particular data type has 2 potential values (typically True or False) A) String. B) Integer. C) Boolean. D) Float. Show Answer Correct Answer: C) Boolean. 2. What will following Python code return?str1="Stack of books" print(len(str1)) A) 13. B) 14. C) 15. D) 16. Show Answer Correct Answer: B) 14. 3. Given numbers = (1, 2, 3, 4); y = (5); numbers += y; What is the correct way to concatenate so print(numbers) shows (1, 2, 3, 4, 5)? A) Use y = (5, ) then numbers += y. B) Use y = [5] then numbers += y. C) Keep y = (5) which already works. D) Use y = 5 then numbers += y. Show Answer Correct Answer: A) Use y = (5, ) then numbers += y. 4. What will be the output of the following code? print('Python' * 2) A) Error:Cannot multiply. B) 2Python. C) PythonPython. D) Python 2. Show Answer Correct Answer: C) PythonPython. 5. Find The Output.L = [5, 2, 2, 7, 5, 4, 7]print(set(L)) A) 5, 2, 2, 7, 5, 4, 7. B) 2, 2, 2, 1. C) 2, 4, 5, 7. D) None of the above. Show Answer Correct Answer: C) 2, 4, 5, 7. 6. What is a Float? A) A data type that contains whole numbers. eg:3, 45, 124. B) Numbers with decimal point. eg:0.5, 2.45, 56.04. C) Group of characters between quotation marks. eg: "dog". D) Data type that can only be True or False. Show Answer Correct Answer: B) Numbers with decimal point. eg:0.5, 2.45, 56.04. 7. Find the outputprint(5**2) A) 25. B) 10. C) 52. D) Error. Show Answer Correct Answer: A) 25. 8. Which of these is NOT a Python keyword? A) If. B) While. C) Name. D) For. Show Answer Correct Answer: C) Name. 9. Which of the following is a correct way to create a list in Python? A) List = \{1, 2, 3\}. B) List = <1, 2, 3>. C) List = [1, 2, 3]. D) List = (1, 2, 3). Show Answer Correct Answer: C) List = [1, 2, 3]. 10. Which of the following is the correct way to start a multi-line comment in Python? A) //. B) /*. C) """. D) #. Show Answer Correct Answer: C) """. 11. What is the correct way to assign the value 10 to a variable named 'x' in Python? A) X == 10. B) X:= 10. C) X = 10. D) 10 = x. Show Answer Correct Answer: C) X = 10. 12. What does IDLE stand for in Python? A) Integrated Development and Learning Environment. B) Interactive Development and Learning Environment. C) Integrated Design and Learning Environment. D) Interactive Design and Learning Environment. Show Answer Correct Answer: A) Integrated Development and Learning Environment. 13. What is the output of print('Hello', name, ', how are you today?')-Where name="Monty" A) Hello Monty, how are you today?. B) Hello, how are you today?. C) Hello Monty. D) Hello, name. Show Answer Correct Answer: A) Hello Monty, how are you today?. 14. How do you create a user-defined function with default parameters? A) My function(param1=default value1, param2). B) Function my function(param1=default value1, param2=default value2) \{\}. C) Def my function(param1=default value1, param2=default value2):. D) Def my function(param1, param2):. Show Answer Correct Answer: C) Def my function(param1=default value1, param2=default value2):. 15. The character that must be at the end of the line for if, while, for etc. A) :. B) ;. C) . D) ,. Show Answer Correct Answer: A) :. 16. Which type of memory is volatile and loses its data when the power is turned off? A) ROM. B) Hard Disk. C) RAM. D) SSD. Show Answer Correct Answer: C) RAM. 17. What is a DataFrame in Pandas? A) A one-dimensional labeled data structure like a list. B) A two-dimensional labeled data structure like a table. C) A three-dimensional labeled data structure like a cube. D) A data structure that only holds numerical data. Show Answer Correct Answer: B) A two-dimensional labeled data structure like a table. 18. To change a variable in the global scope from within a function we use which keyword? A) Return. B) Global. C) Local. D) Def. Show Answer Correct Answer: B) Global. 19. Which of the following is the correct syntax to create a NumPy array? A) Np.array([1, 2, 3]). B) Numpy.array([1, 2, 3]). C) Np.array((1, 2, 3)). D) All of the above. Show Answer Correct Answer: D) All of the above. 20. Which data type represnts a whole number? A) String. B) Integer. C) Boolean. D) Float. Show Answer Correct Answer: B) Integer. 21. Which of the following is not the feature of Python language? A) Python is a proprietary software. B) Python is not case-sensitive. C) Python uses brackets for blocks and nested blocks. D) All of the above. Show Answer Correct Answer: A) Python is a proprietary software. 22. Identify the term that describes the creation of a new object. A) Instantiation. B) Declare. C) Iteration. D) Initialize. Show Answer Correct Answer: A) Instantiation. 23. A developer creates t = (3, 4, 5) and wants to replace 4 with 7. What is the appropriate approach? A) Use append to add 7. B) Convert tuple to set and edit. C) Assign t[1] = 7 directly. D) Recreate a new tuple with 7. Show Answer Correct Answer: D) Recreate a new tuple with 7. 24. Which are the advantages of functions in python? A) Reducing duplication of code. B) Decomposing complex problems into simpler pieces. C) Improving clarity of the code. D) All of the mentioned. Show Answer Correct Answer: D) All of the mentioned. 25. What type of data is stored in the variable below?x = "Hello, World!" A) Integer. B) Float. C) String. D) Boolean. Show Answer Correct Answer: C) String. ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 2 Introduction To Python Quiz 1Class 11 Computer Science Chapter 2 Introduction To Python Quiz 2Class 11 Computer Science Chapter 2 Introduction To Python Quiz 3Class 11 Computer Science Chapter 2 Introduction To Python Quiz 4Class 11 Computer Science Chapter 2 Introduction To Python Quiz 5Class 11 Computer Science Chapter 2 Introduction To Python Quiz 6Class 11 Computer Science Chapter 2 Introduction To Python Quiz 7Class 11 Computer Science Chapter 2 Introduction To Python Quiz 8Class 11 Computer Science Chapter 2 Introduction To Python Quiz 9Class 11 Computer Science Chapter 2 Introduction To Python Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books