This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 13 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 13 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What will be the output of the following Python code?x = ['ab', 'cd'] for i in x:x.append(i.upper()) print(x) A) ['AB', 'CD']. B) ['ab', 'cd', 'AB', 'CD']. C) ['ab', 'cd']. D) None of the mentioned. Show Answer Correct Answer: D) None of the mentioned. 2. What will be the output of the following code? "'pythonprint(type(7)) "' A) . B) . C) . D) . Show Answer Correct Answer: A) . 3. What will the following code output?print(2 == 2.0) A) True. B) False. C) TypeError. D) None. Show Answer Correct Answer: A) True. 4. What is an example of a task a robot controlled by Python can do? A) Fly an airplane. B) Pick up objects. C) Write a book. D) Edit videos. Show Answer Correct Answer: B) Pick up objects. 5. Which of the following will store the value 3.5 as a float in Python? A) Value = "3.5". B) Value = 3.5. C) Value = '3.5'. D) Value = 3, 5. Show Answer Correct Answer: B) Value = 3.5. 6. What will print(len([1, 2, 3, 4])) output? A) 3. B) 4. C) 5. D) Error. Show Answer Correct Answer: B) 4. 7. Which of these is NOT a data type? A) String. B) Number. C) Letter. D) List. Show Answer Correct Answer: C) Letter. 8. What will be the output of this code:x = 10; if x < 5:print('Low'); else:print('High')? A) High. B) Low. C) Undefined. D) Error. Show Answer Correct Answer: A) High. 9. Why does a 'NameError' occur in Python? A) Logical mistake. B) Incorrect syntax. C) Undefined variable. D) Invalid input. Show Answer Correct Answer: C) Undefined variable. 10. What will this code print? "'pythonprint("My favourite colour is blue") "' A) My favourite colour is blue. B) "My favourite colour is blue". C) My favourite colour is blue". D) Print("My favourite colour is blue"). Show Answer Correct Answer: A) My favourite colour is blue. 11. What is the output of the following code? print('A' == 'a') A) None. B) Error. C) False. D) True. Show Answer Correct Answer: C) False. 12. Named reference that holds data in memory. Assigned using the "=" sign with name on left A) References. B) Keyword. C) Variable. D) Identifiers. Show Answer Correct Answer: C) Variable. 13. A block is A) A statement including elements of a command. B) The structure and form of the code. C) Source code that is grouped together. D) Meaning assigned to symbols, characters and words. Show Answer Correct Answer: C) Source code that is grouped together. 14. How many times will the loop run?for i in range(1, 6):print(i) A) 4 times. B) 5 times. C) 6 times. D) Infinite times. Show Answer Correct Answer: B) 5 times. 15. What will be the value of 'result' after executing the following code?result = 10 > 5 and 3 < 2 A) True. B) False. C) 1. D) 0. Show Answer Correct Answer: B) False. 16. Which of the following is the equal to comparison operator in Python (used to check if two values are the same)? A) =. B) ==. C) ===. D) !=. Show Answer Correct Answer: B) ==. 17. What is the decimal of binary 111? A) 6. B) 7. C) 8. D) 9. Show Answer Correct Answer: B) 7. 18. Python is ..... language A) Compiled. B) Interpreted. C) Both compiled and interpreted. D) None of the above. Show Answer Correct Answer: B) Interpreted. 19. Which data type can store numbers, letters and symbols? A) String. B) Integer. C) Float. D) Boolean. Show Answer Correct Answer: A) String. 20. Module-2:True or False:Pretty Printing is a topic under Dictionaries and Structuring Data. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 21. What does the 'len()' function do in Python? A) The 'len()' function sorts the items in a collection. B) The 'len()' function returns the number of items in an object. C) The 'len()' function converts an object to a string. D) The 'len()' function calculates the sum of numbers in a list. Show Answer Correct Answer: B) The 'len()' function returns the number of items in an object. 22. What will the output be from the following code?print("Hello world!" * 2) A) TypeError. B) Hello world world!. C) Hello world!Hello world!. D) Hello world! * 2. Show Answer Correct Answer: C) Hello world!Hello world!. 23. What does Python turtle allow you to do? A) Draw using Java. B) Draw using python. C) Insert Audio. D) Edit photo. Show Answer Correct Answer: B) Draw using python. 24. What programming language do web developers use to create dynamic web applications besides HTML and CSS? A) Python. B) French. C) Spanish. D) Algebra. Show Answer Correct Answer: A) Python. 25. You want three different messages for weather: "rainy", "sunny", or "snowy" . Which structure should you use? A) An if, elif, and else chain. B) An if with else for all three cases. C) Only one if statement with no else. D) Two separate else blocks in a row. Show Answer Correct Answer: A) An if, elif, and else chain. ← 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