This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 13 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 13 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. The "break" command: A) Will quit the whole program. B) Will stop the loop and continue with any instructions after the loop. C) Will skip any remaining code in the loop, but go back to the top and restart the loop. D) Will cause an error. Show Answer Correct Answer: B) Will stop the loop and continue with any instructions after the loop. 2. What is an input? A) A command that allows us to ask the user to enter some data. B) To plug in something. C) Data displayed on a screen. D) A function. Show Answer Correct Answer: A) A command that allows us to ask the user to enter some data. 3. Comments are A) Statements only the computer can understand. B) Programming notes or reminders that the computer ignores. C) Not appreciated. D) Statements that allow the computer to test a value and perform different actions depending on the outcome of that test. Show Answer Correct Answer: B) Programming notes or reminders that the computer ignores. 4. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota', 'Guam']mariana ..... islands.sort()print(mariana ..... islands) A) ['Tinian', 'Saipan', 'Rota', 'Guam']. B) ['Guam', 'Tinian', 'Rota', 'Saipan']. C) ['Saipan', 'Rota', 'Guam', 'Tinian']. D) ['Guam', 'Rota', 'Saipan', 'Tinian']. Show Answer Correct Answer: D) ['Guam', 'Rota', 'Saipan', 'Tinian']. 5. Do you think a variable to store a car's value would be a class or instance variable? A) Class. B) Instance. C) All the above. D) None of the above. Show Answer Correct Answer: B) Instance. 6. Why is iteration important? A) It determines the order in which instructions are carried out. B) It allows code to be simplified by removing duplicated steps. C) It allows multiple paths through a program. D) None of the above. Show Answer Correct Answer: B) It allows code to be simplified by removing duplicated steps. 7. Print(9>2 and 6<=6) A) TRUE. B) FALSE. C) All the above. D) None of the above. Show Answer Correct Answer: A) TRUE. 8. Choose the correct data type:-5.88 A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: D) Real/Float. 9. A prompt means A) The computer is ready to accept your command. B) A symbol or set of symbols that represents an action or comparison and returns a result. C) A set of instructions that is repeated until a condition is reached. D) The rate or speed that images are drawn on the screen in an animation. Show Answer Correct Answer: A) The computer is ready to accept your command. 10. What will be displayed on the screen when the following code is run? esports = ["Donkey Kong", "Galaga", "Pac Man"] print( esports[1] ) A) Galaga. B) Donkey Kong. C) Pac Man. D) Syntax error; you can't access individual list items this way. Show Answer Correct Answer: A) Galaga. 11. How many return statements can you place inside one function body? A) As many as needed; each marks a spot where program flow returns to the calling code. B) You can have one return statement per parameter that is defined by the function "def". C) You are limited by the number of body statements, divided by 2. D) Exactly one. Show Answer Correct Answer: A) As many as needed; each marks a spot where program flow returns to the calling code. 12. What will be the data type of num1 if the following code is executed?num1=float(5) A) String. B) Int. C) Float. D) Number. Show Answer Correct Answer: C) Float. 13. Why the following variable name invalid:1st ..... Name A) No special characters other than underscore. B) The variable name starts with a number. C) Keep names meaningful. D) There is nothing wrong with this variable name. Show Answer Correct Answer: B) The variable name starts with a number. 14. When do you know when you come to the end of the loop? A) Its states End loop. B) The command End is given. C) The indentation stops. D) None of the above. Show Answer Correct Answer: C) The indentation stops. 15. Word = "amazing"For the given string if we run word[2:5] what does it mean? A) It will extract alphabets from index 2 to index 4. B) It will extract alphabets from index 2 to index 5. C) It will extract alphabets from position 2 to position 4. D) It will extract alphabets from position 2 to position 5. Show Answer Correct Answer: A) It will extract alphabets from index 2 to index 4. 16. Which of the following would NOT work as a variable name? A) A. B) Len. C) Length. D) X. Show Answer Correct Answer: B) Len. 17. Which of the following is the correct way to add the number 4 to mylist? A) Mylist + 4. B) Mylist.append(4). C) Mylist.append([4]). D) 4.append(mylist). Show Answer Correct Answer: B) Mylist.append(4). 18. Why is it important to continue researching Burmese Pythons? A) To export them back to Southeast Asia. B) To increase their population in the wild. C) To domesticate them for pet trade. D) To find their weaknesses and control their population. Show Answer Correct Answer: D) To find their weaknesses and control their population. 19. Suppose B is a subclass of A, to invoke the ..... init ..... method in A from B, what is the line of code you should write? A) ....init (self). B) ....init (self). C) ....init (B). D) ....init (A). Show Answer Correct Answer: A) ....init (self). 20. Fill in the blank such that the following Python code results in the formation of an inverted, equilateral triangle.import turtlet=turtle.Pen()for i in range(0, 3):t.forward(150)t.right( ..... ) A) -60. B) 120. C) -120. D) 60. Show Answer Correct Answer: B) 120. 21. If Python were to get into a fight with JavaScript, who would win? A) Python. B) JavaScript. C) All the above. D) None of the above. Show Answer Correct Answer: A) Python. 22. Str="world of python programming"str.upper() A) 'WORLD OF PYTHON PROGRAMMING STORE'. B) 'WORLD OF PyTHON PROGRAMMING STORE'. C) 'WORLD OF PYTHON PROGRaMMING STORE'. D) 'WORLD oF PYTHON PROGRAMMING STORE'. Show Answer Correct Answer: A) 'WORLD OF PYTHON PROGRAMMING STORE'. 23. Random.random() generates a floating point number between ..... and ..... A) 1 and 2. B) 1 and 0. C) 0 and 1. D) 0 and 10. Show Answer Correct Answer: C) 0 and 1. 24. A character or thing that can perform actions A) Method. B) Object. C) Code. D) Iterate. Show Answer Correct Answer: B) Object. 25. Which of the following is NOT a reason that loops are useful when writing code? A) Loops help us write the same program with less lines of code. B) Loops let us make shapes of multiple sizes. C) Loops make it easier to alter code once it's written. D) Loops make our code easier to read. Show Answer Correct Answer: B) Loops let us make shapes of multiple sizes. ← 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