This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 10 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 10 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which keyword is used to start an if statement in Python? A) Else. B) If. C) For. D) When. Show Answer Correct Answer: B) If. 2. Which of the following applications is NOT commonly developed using Python? A) Desktop GUI Applications. B) Web Development. C) Embedded Systems and IoT. D) Operating System Kernels. Show Answer Correct Answer: D) Operating System Kernels. 3. What is the purpose of comments in Python code? A) To make the code more readable. B) To execute code. C) To define variables. D) None of the above. Show Answer Correct Answer: A) To make the code more readable. 4. Square brackets in an assignment statement will create which type of data structure?( s=[] ) A) List. B) Queue. C) Dictionary. D) Set. Show Answer Correct Answer: A) List. 5. What will be the output of the following code? "'pythonfor i in range(3):print(i) "' A) '0 1 2'. B) '1 2 3'. C) '0 1 2 3'. D) '1 2 3 4'. Show Answer Correct Answer: A) '0 1 2'. 6. Which construct is used to handle exceptions in Python? A) Try except. B) Catch throw. C) Do except. D) Try catch. Show Answer Correct Answer: A) Try except. 7. What is a correct syntax to return the first character in a string? A) X="Hello" .sub(0, 1). B) X="Hello"[0]. C) X=sub("Hello", 0, 1). D) X=substring("Hello", 0, 1). Show Answer Correct Answer: B) X="Hello"[0]. 8. What is the primary feature of a Python set? A) It preserves the order of elements. B) It allows duplicate elements. C) It stores elements in key-value pairs. D) It is an unordered collection of unique items. Show Answer Correct Answer: D) It is an unordered collection of unique items. 9. How do you update data in SQL? A) UPDATE. B) MODIFY. C) CHANGE. D) SET. Show Answer Correct Answer: A) UPDATE. 10. Which of the following is a control structure in Python? A) Variable. B) Loop. C) Function. D) String. Show Answer Correct Answer: B) Loop. 11. Which of the below is the code for creating a variable? A) Name = "John". B) 3 = number. C) First name = "Molly". D) Number == 3. Show Answer Correct Answer: A) Name = "John". 12. The result of this program:Friday = Falseif Friday:print("Jeans day!")else:print("Uniform day") A) Jeans day. B) Today is Friday. C) Uniform day. D) Not Friday. Show Answer Correct Answer: C) Uniform day. 13. Why is indentation important in 'if' statements? A) It tells Python which code belongs inside the 'if'. B) It makes the code run faster. C) It changes numbers into strings. D) It automatically fixes errors. Show Answer Correct Answer: A) It tells Python which code belongs inside the 'if'. 14. Which keyword is used to import specific functions from a module? A) Import. B) Include. C) Def. D) From. Show Answer Correct Answer: D) From. 15. What is the next topic to be covered in the following class? A) Web development with Python. B) Machine learning basics. C) Creating reusable code blocks with functions. D) Advanced data structures. Show Answer Correct Answer: C) Creating reusable code blocks with functions. 16. What type of data does the 'str' data type represent? A) Numeric values. B) Textual data. C) None of the above. D) Boolean values. Show Answer Correct Answer: B) Textual data. 17. The default IDE that comes with Python is called: A) PyCharm. B) Visual Studio Code. C) IDLE. D) Spyder. Show Answer Correct Answer: C) IDLE. 18. What is the function of a variable in Python? A) A variable is a combination of letters and numbers. B) A variable is a location in memory to temporarily store text or numbers. C) A variable is a special keyword that does a specific job. D) A variable is a sequence of instructions. Show Answer Correct Answer: B) A variable is a location in memory to temporarily store text or numbers. 19. What is a loop used for? A) To print text. B) To make decisions. C) To repeat actions. D) To store data. Show Answer Correct Answer: C) To repeat actions. 20. Arrange this in order of Precedence.1. Exponentiation2. Parentheses3. Multiplication and Division4. Addition and Subtraction A) 1, 2, 3, 4. B) 2, 1, 3, 4. C) 1, 2, 4, 3. D) 2, 3, 1, 4. Show Answer Correct Answer: B) 2, 1, 3, 4. 21. Which of the following is not correct for naming an identifier in Python? A) We cannot use special symbols like !, @, #, $ , %, etc., in identifiers. B) Identifier should not be a keyword. C) Spaces are allowed in identifiers. D) Identifier can be of any length. Show Answer Correct Answer: C) Spaces are allowed in identifiers. 22. The course demonstrates the use of built-in functions to navigate the file system. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 23. An exception is A) The structure of form of the code. B) The meaning of the characters and words in the code. C) The statement that is missing from the instructions. D) An event occurring during execution of a program which disrupts the flow of the program's instructions. Show Answer Correct Answer: D) An event occurring during execution of a program which disrupts the flow of the program's instructions. 24. Which method is used to find the memory location of a variable? A) Id(). B) None of the above. C) Add(). D) Type(). Show Answer Correct Answer: A) Id(). 25. What is the answer to? print(10 % 4) A) 1. B) 3. C) 2. D) 4. Show Answer Correct Answer: C) 2. ← 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 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books