This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 12 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 12 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following is an example of an 'object.property(attribute)' A) Name.pen(5). B) Name.penup(). C) Name.pendraw(10). D) Name.penup. Show Answer Correct Answer: B) Name.penup(). 2. What is an expression in Python A) Something i feel strongly about. B) A math problem. C) A saying with a meaning behind it. D) Syntax. Show Answer Correct Answer: B) A math problem. 3. Numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]print ( numbers[-3] == numbers[7])The output of the program above is A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 4. ..... method will returns number of key-value pairs in the given dictionary. A) Len( ). B) Pop( ). C) Del( ). D) Keys( ). E) Values( ). Show Answer Correct Answer: A) Len( ). 5. In a list called "players" if you wanted to delete the item with an index of 3 which of the following examples of code would be correct? A) Players.pop[3]. B) Players.delete(3). C) Players.remove(3). D) Players.pop(3). Show Answer Correct Answer: D) Players.pop(3). 6. Who is the creator of Python Language A) James Gosling. B) Guido van Rossum. C) Dennis Retchie. D) Bjarne stroustrup. Show Answer Correct Answer: B) Guido van Rossum. 7. Which option best describes how user input can impact our programs? A) It forces the user to write their own program. B) It allows us to make programs interactive. C) It lets us grade the user on their work. D) User-input has no impact on our programs. Show Answer Correct Answer: B) It allows us to make programs interactive. 8. Please select all correct ways to empty the following dictionarystudent = \{ "name": "Emma", "class":9, "marks":75 \}Find the output:print(student.get('class')) A) "class":9. B) 3. C) 9. D) None of these. Show Answer Correct Answer: C) 9. 9. What does != represent? A) Possibly equal to. B) Not equal to. C) Check for error. D) Don't assign a value. Show Answer Correct Answer: B) Not equal to. 10. ..... method removes all items from the particular dictionary. A) Clear( ). B) Pop( ). C) Del. D) None of the above. Show Answer Correct Answer: A) Clear( ). 11. How many elements can be inserted using append() method? A) 1. B) 2. C) 3. D) Any number of elements. Show Answer Correct Answer: A) 1. 12. What was the original purpose of creating Python? A) The original purpose of creating Python was to dominate the programming market. B) Python was created to be the most difficult programming language to learn. C) The original purpose of creating Python was to develop a language that was easy to read, write, and maintain. D) The original purpose of creating Python was to replace all other existing programming languages. Show Answer Correct Answer: C) The original purpose of creating Python was to develop a language that was easy to read, write, and maintain. 13. Any string is False, except empty strings. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 14. In the following code, n is a/an ..... ?n = '5' A) Integer. B) String. C) Tuple. D) Operator. Show Answer Correct Answer: B) String. 15. Choose the correct data type:"You follow the monster into the cave!" A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: B) String. 16. What is the value of num when this loop completes?num = 0for i in range(2, 8, 2):num += i A) 2. B) 8. C) 12. D) 20. Show Answer Correct Answer: C) 12. 17. What will be the output of the following program:fruits = ["apple", "banana", "cherry"] for x in fruits:if x == "banana":print(x) A) Cherry. B) Apple. C) Apple cherry. D) Banana. Show Answer Correct Answer: D) Banana. 18. What do For Loops do? A) A programming structure used to repeat actions without the player needing to write the same lines of code over and over. B) Data about or belonging to an object. C) Repeat a block of code while a certain condition is true. D) Repeat a block of code a certain number of times. Show Answer Correct Answer: D) Repeat a block of code a certain number of times. 19. Suppose list=[12, 3, 22, "mago", "hello"], what is list[-6] A) Error. B) None. C) Mango. D) 12. Show Answer Correct Answer: A) Error. 20. What is displayed to the screen when the following code runs? esports = ["Donkey Kong", "Galaga", "Pac Man"] esports.insert(2, "apple") print(esports) A) ["Donkey Kong", "Galaga", "Pac Man"]. B) ["Donkey Kong", "Galaga", "Pac Man", "apple"]. C) [ "apple", "Donkey Kong", "Galaga", "Pac Man"]. D) ["Donkey Kong", "Galaga", "apple", "Pac Man"]. Show Answer Correct Answer: D) ["Donkey Kong", "Galaga", "apple", "Pac Man"]. 21. The title( ) function A) Assigns title. B) Returns the title of the file. C) Returns string in title case. D) None of the above. Show Answer Correct Answer: C) Returns string in title case. 22. Items are accessed by their position in a dictionary A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 23. Ch=99print(chr(ch)) A) C. B) B. C) A. D) D. Show Answer Correct Answer: A) C. 24. What function is used to output a message in python? A) Print(""). B) Input=name. C) Print. D) Name=input. Show Answer Correct Answer: A) Print(""). 25. Which of the following is a Python command A) @echo off. B) Print (""). C) Print "name". D) Echo. Show Answer Correct Answer: B) Print (""). ← 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