This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 9 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 9 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is wrong with the following attempt to initialize a list? data = ["hockey", 4, False] A) Nothing; this will work correctly. B) "data" is not a valid variable name. C) You can't mix different types of data in a single list. D) You should be using parentheses ( ) to surround the items in a list. Show Answer Correct Answer: A) Nothing; this will work correctly. 2. What is the output of the following list operationaList = [10, 20, 30, 40, 50, 60, 70, 80]print(aList[2:5])print(aList[:4])print(aList[3:]) A) [20, 30, 40, 50][10, 20, 30, 40][30, 40, 50, 60, 70, 80]. B) [30, 40, 50][10, 20, 30, 40][40, 50, 60, 70, 80]. C) None of these. D) None of the above. Show Answer Correct Answer: B) [30, 40, 50][10, 20, 30, 40][40, 50, 60, 70, 80]. 3. Choose the correct data type:yes / no A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: E) Boolean. 4. In python, a function is defined using the following keyword A) Func. B) Functions. C) Def. D) Function(). Show Answer Correct Answer: C) Def. 5. Select the right syntax for the if condition A) A=10 b=20 if a is greater than b:print("Hello World"). B) A=10 b=20 if a>b:print("Hello World"). C) A=10 b=20 if a>b; print("Hello World"). D) None of the above. Show Answer Correct Answer: B) A=10 b=20 if a>b:print("Hello World"). 6. Gjdk is not a good name for a variable, why? A) It starts with a capital letter. B) It does not contain any spaces. C) There are no vowels. D) It's meaningless. Show Answer Correct Answer: D) It's meaningless. 7. What is the output of the program below?mariana ..... islands = ['Guam', 'Saipan', 'Tinian', 'Rota']cmni = mariana ..... islands[1:]len(cmni) A) 1. B) 2. C) 3. D) 4. Show Answer Correct Answer: C) 3. 8. What is the Python built-in function used to display numbers and text on the screen? A) Print. B) Input. C) Output. D) Command. Show Answer Correct Answer: A) Print. 9. Numbers = [5, 14, 9, 17] for number in numbers:if number >= 9:print (number)The output will be? A) 17. B) 9. C) 14 9 17. D) 1417. Show Answer Correct Answer: C) 14 9 17. 10. If the number of arguments is unknown, which symbol is used before the parameter name A) #. B) %. C) *. D) /. Show Answer Correct Answer: C) *. 11. What is printed?cheer = "Go Eagles!"print cheer[5:8] A) Gle. B) Agle. C) Gles. D) Agles. Show Answer Correct Answer: A) Gle. 12. What is the result of following Program in python3for i in range(3, 1):print(i) A) 32. B) 321. C) Error. D) 210. Show Answer Correct Answer: A) 32. 13. What is the correct data type for the value of cat?cat = input("How many cats do you have?") A) String. B) Integer. C) Float. D) Boolean. Show Answer Correct Answer: A) String. 14. Inventor of Python Code Language A) Guido van Rossum. B) Roger van Grossman. C) Steve Jobs. D) Bill Gates. Show Answer Correct Answer: A) Guido van Rossum. 15. Which symbol means "not equal to" ? A) ==. B) <=. C) >=. D) !=. Show Answer Correct Answer: D) !=. 16. Identify the code that properly accesses an engine ..... sound() method in a Car class. A) Porsche.engine sound(). B) Mustang = engine sound(). C) Engine sound(tesla):. D) Engine sound.Car(camaro). Show Answer Correct Answer: A) Porsche.engine sound(). 17. An action performed by an object A) Object. B) Method. C) Syntax. D) Plan. Show Answer Correct Answer: B) Method. 18. The character used in comments in python is ..... A) @. B) #. C) &. D) $. Show Answer Correct Answer: B) #. 19. I am 71 years old! What will the output be?:IF you are 70 or older, say "You are aged to perfection!" ELIF you are exactly 50, say "Wow, you are half a century old!" ELSE say "You are a spring chicken!" A) "You are aged to perfection!". B) "Wow, you are half a century old!". C) "You are a spring chicken!". D) None of the above. Show Answer Correct Answer: A) "You are aged to perfection!". 20. What is the output of the following code?x = 5y = 3print(x + y) A) 8. B) 2. C) 15. D) 7. Show Answer Correct Answer: A) 8. 21. An algorithm is a set of precise instructions designed to solve a problem. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 22. Which keyword is used to take input from the user in Python? A) Read. B) Scan. C) Input. D) Get. Show Answer Correct Answer: C) Input. 23. Which method is used to convert a given string in Capital letters? A) Capital. B) Upper. C) ConverttoUpper. D) Capitalize. Show Answer Correct Answer: D) Capitalize. 24. In python the ' INTEGER data type' can be defined as ..... ? A) Holds alphanumeric data as text. B) Holds whole numbers. C) Holds numbers with a decimal point. D) Holds either 'true' or 'false'. Show Answer Correct Answer: B) Holds whole numbers. 25. What is the result of len([1, [2, 3], 4]) in Python? A) 3. B) 4. C) 6. D) 2. Show Answer Correct Answer: A) 3. ← 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 10Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books