This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 15 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 15 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. The 'in' operator is used to check if a value exists within an iterable object container such as a list. Evaluates to true if it finds a variable in the specified sequence and false otherwise. A) TRUE. B) FALSE. C) All the above. D) None of the above. Show Answer Correct Answer: A) TRUE. 2. An empty list can be declared as A) FruitList = "". B) FruitList = ["empty"]. C) FruitList == []. D) FruitList = []. Show Answer Correct Answer: D) FruitList = []. 3. Consider the code:a=21; b=6print(a/b); print(a//b); print(a%b) What is the result? A) 3.033. B) 333. C) 3.533. D) 3.53.53. Show Answer Correct Answer: C) 3.533. 4. Comparison Operators:Select the correct operator for equals to A) =. B) ==. C) ===. D) ====. Show Answer Correct Answer: B) ==. 5. What is the output of the following piece of code?class A:def ..... init ..... (self):self.multiply(15) print(self.i) def multiply(self, i):self.i = 4 * i;class B(A):def ..... init ..... (self):super() ..... init ..... () def multiply(self, i):self.i = 2 * i;obj = B() A) 15. B) 60. C) An exception is thrown. D) 30. Show Answer Correct Answer: D) 30. 6. While True: ..... breakWhat does a break statement do inside the "While-True" loop A) The break statement breaks the code creating an error. B) It breaks the loop, else the loop will run infinitely. C) Break is just a template code and needs to be removed to execute the actual programs. D) The break statement doesn't affect the code and can be ignored in this case. Show Answer Correct Answer: B) It breaks the loop, else the loop will run infinitely. 7. What is the output of the following code?p, q, r = 10, 20, 30print(p, q, r) A) 10 20. B) 10 20 30. C) Error:invalid syntax. D) None of the above. Show Answer Correct Answer: B) 10 20 30. 8. Names = ["Hyderabad", "New Delhi", "New York"]What gets printed when you saynames[1][-1] A) I. B) D. C) K. D) Y. Show Answer Correct Answer: A) I. 9. An exception can be manually triggered by the command A) Raise. B) Try. C) Except. D) Trigger. Show Answer Correct Answer: A) Raise. 10. What is elif in Python? A) Eliminate if. B) Else if. C) A person's name. D) False. Show Answer Correct Answer: B) Else if. 11. What is a Count-Controlled loop? A) For loop. B) While loop. C) All the above. D) None of the above. Show Answer Correct Answer: A) For loop. 12. What is the syntax to check if a value is greater than another value in Python? A) A < b. B) A > b. C) A >= b. D) A == b. Show Answer Correct Answer: B) A > b. 13. Mylist = ["a", "b"]mylist[1] = "c"'print(mylist) A) ["a", "c"]. B) ["a", "b"]. C) ["a", "b", "c"]. D) Mylist. Show Answer Correct Answer: A) ["a", "c"]. 14. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota']mariana ..... islands.append('Guam')print(mariana ..... islands) A) ['Saipan', 'Tinian', 'Rota']. B) ['Guam', 'Tinian', 'Rota']. C) ['Saipan', 'Tinian', 'Rota', 'Guam']. D) ['Guam', 'Saipan', 'Tinian', 'Rota']. Show Answer Correct Answer: C) ['Saipan', 'Tinian', 'Rota', 'Guam']. 15. Which of the following would be an example of a float variable: A) ValidInput = False. B) GuessCount = 100. C) Name = "Bilbo". D) Pi = 3.14159265359. Show Answer Correct Answer: D) Pi = 3.14159265359. 16. What is one of the ecological impacts of Burmese Pythons in Florida? A) They reduce populations of native species. B) They compete with humans for resources. C) They have no significant impact on the ecosystem. D) They increase the number of certain native species. Show Answer Correct Answer: A) They reduce populations of native species. 17. What is the output when we execute list( "hello" )? A) ['h', 'e', 'l', 'l', 'o']. B) ['hello']. C) ['llo']. D) ['olleh']. Show Answer Correct Answer: A) ['h', 'e', 'l', 'l', 'o']. 18. A loop that repeats forever until the level is beaten A) While loop. B) Loop. C) Forever loop. D) Infinite loop/while true loop. Show Answer Correct Answer: D) Infinite loop/while true loop. 19. Which is NOT a data type in Python? A) Integer. B) Boolean. C) Anchor. D) Float. Show Answer Correct Answer: C) Anchor. 20. In Python, Dictionaries are A) Immutable. B) Mutable. C) All the above. D) None of the above. Show Answer Correct Answer: B) Mutable. 21. What is an output? A) A piece of data that is shown on the screen. B) Data that the user enters. C) An output. D) A orange. Show Answer Correct Answer: A) A piece of data that is shown on the screen. 22. Look at the following code:L = 50W = 30Area = L * Wprint ("Area")What is the result of this code? A) Area. B) 50. C) 150. D) An error message. Show Answer Correct Answer: A) Area. 23. If I want to store my name in a variable, which of the following would be a good variable name in best practice? A) Name. B) Teacher. C) Mister. D) Abcdef. Show Answer Correct Answer: A) Name. 24. Which operators are used to compare 2 values whether it is equal? A) ==. B) =. C) >. D) <>. Show Answer Correct Answer: A) ==. 25. What concept repeats whatever is inside it? A) Conditional. B) Variable. C) Loop. D) Function. Show Answer Correct Answer: C) Loop. ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 1Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 2Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 3Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 4Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 5Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 6Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 7Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 8Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 9Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books