This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 25 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 25 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What does symbol % do? A) Integer exact division. B) Percentage. C) Division. D) Remainder. Show Answer Correct Answer: D) Remainder. 2. Which of the following is the correct way to get input from a user in Python? A) Input("Please enter your name: "). B) Get("Please enter your name: "). C) Scan("Please enter your name: "). D) Read("Please enter your name: "). Show Answer Correct Answer: A) Input("Please enter your name: "). 3. To check if a list contains an item we can use which keyword? A) Del. B) Out. C) In. D) Not in. Show Answer Correct Answer: C) In. 4. What is the output of bool([])? A) True. B) False. C) None. D) Error. Show Answer Correct Answer: B) False. 5. What will print(5 == 5) output? A) True. B) False. C) 5. D) Error. Show Answer Correct Answer: A) True. 6. Which is a correct variable name? A) 1name. B) My name. C) My-name. D) Print. Show Answer Correct Answer: B) My name. 7. A Relational operator is also called as ..... A) Arithmetic operator. B) Logical operator. C) Assignment operator. D) Comparative operator. Show Answer Correct Answer: D) Comparative operator. 8. Which PLS data type represents a sequence of items with the same data type? A) String. B) Array. C) Record. D) Character. Show Answer Correct Answer: B) Array. 9. What will be the output of the following code?x = 10; if x < 5:print("Small"); else:print("Large") A) Small. B) 10. C) 5. D) Large. Show Answer Correct Answer: D) Large. 10. If the condition in a loop is false in the first step itself, you get ..... A) No output. B) Infinite. C) Error. D) None of the above. Show Answer Correct Answer: A) No output. 11. What is the purpose of the 'head()' method in a DataFrame? A) To display the first n rows of the DataFrame. B) To display the last n rows of the DataFrame. C) To summarize the DataFrame's statistics. D) To filter the DataFrame based on a condition. Show Answer Correct Answer: A) To display the first n rows of the DataFrame. 12. What will be the result of:Print("Hello Earth!")? A) Syntax Error. B) Hello Earth!. C) "Hello Earth!". D) No result. Show Answer Correct Answer: A) Syntax Error. 13. What is a data type? A) The data a user enters from a keyboard. B) The type of the data. C) The classification of data items. D) None of the above. Show Answer Correct Answer: C) The classification of data items. 14. To store a value in a Python program we can use a(n) A) Box. B) Drawer. C) Variable. D) Expression. Show Answer Correct Answer: C) Variable. 15. How do we communicate with computers in programming? A) By speaking to them. B) By giving them instructions using a programming language. C) By drawing pictures. D) By pressing random keys on the keyboard. Show Answer Correct Answer: B) By giving them instructions using a programming language. 16. What is an operator? A) Mathematical symbols. B) A type of variable. C) A programming error. D) None of the above. Show Answer Correct Answer: A) Mathematical symbols. 17. Which of these is the best description of a list in Python? A) A list is a collection of data that has an order and can be changed. B) A list is a lot of variables. C) A list is used for shopping. D) A list is a collection of data that cannot hold duplicated data and cannot be changed. Show Answer Correct Answer: A) A list is a collection of data that has an order and can be changed. 18. Return statement is mandatory in function definition (T/F) A) False. B) Not applicable. C) True. D) Depends on the function. Show Answer Correct Answer: A) False. 19. What will type(3.14) return? A) Int. B) Float. C) Double. D) Decimal. Show Answer Correct Answer: B) Float. 20. What is a syntax error? A) An error in the logic of the program. B) An error that causes a program to crash. C) An error in the rules of the language. D) An error in the data type. Show Answer Correct Answer: C) An error in the rules of the language. 21. What is the output of the following code? "'pythonprint([2, 4, 6] + [8, 10]) "' A) [2, 4, 6, 8, 10]. B) [2, 4, 6][8, 10]. C) [2, 4, 6, [8, 10]]. D) [2, 4, 6, 10, 8]. Show Answer Correct Answer: A) [2, 4, 6, 8, 10]. 22. Which chapters from Textbook 1 are covered in Module-1? A) Chapters 1-3. B) Chapters 4-5. C) Chapters 6-8. D) Chapters 9-10. Show Answer Correct Answer: A) Chapters 1-3. 23. What is the command to read a CSV file into a DataFrame? A) Pd.read csv('file path'). B) Pd.load csv('file path'). C) Pd.import csv('file path'). D) Pd.open csv('file path'). Show Answer Correct Answer: A) Pd.read csv('file path'). 24. To remove an item from a list we can use which keyword? A) Esc. B) Break. C) Del. D) Clear. Show Answer Correct Answer: C) Del. 25. What is the result of the following expression in Python:$5 + 3 * 2$ A) 16. B) 11. C) 13. D) 21. Show Answer Correct Answer: B) 11. ← 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