This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 38 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 38 (19 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. A while loop is used when A) You know how many times you are going to loop. B) You want to loop for an unknown number of times, and possibly forever. C) You only want to run the code in the loop once. D) You see the word while in the problem description. Show Answer Correct Answer: B) You want to loop for an unknown number of times, and possibly forever. 2. What is the output of the following list function?sampleList = [10, 20, 30, 40, 50]sampleList.append(60)print(sampleList)sampleList.append(60)print(sampleList) A) [10, 20, 30, 40, 50, 60][10, 20, 30, 40, 50, 60, 60]. B) [10, 20, 30, 40, 50, 60][10, 20, 30, 40, 50, 60]. C) Both are wrong. D) None of the above. Show Answer Correct Answer: A) [10, 20, 30, 40, 50, 60][10, 20, 30, 40, 50, 60, 60]. 3. Which of these definitions correctly describes a module? A) Denoted by triple quotes for providing the specification of certain program elements. B) Design and implementation of specific functionality to be incorporated into a program. C) Defines the specification of how it is to be used. D) Any program that reuses code. Show Answer Correct Answer: B) Design and implementation of specific functionality to be incorporated into a program. 4. Select the correct operator for Modulus: A) ?. B) /. C) >. D) %. Show Answer Correct Answer: D) %. 5. Which two statements are used to implement iteration? A) IF and WHILE. B) ELSE and WHILE. C) FOR and WHILE. D) IF and ELSE. Show Answer Correct Answer: C) FOR and WHILE. 6. Which function allows us to add one element to a list at a desired location? A) Append(). B) Extend(). C) Insert(). D) Pop(). Show Answer Correct Answer: C) Insert(). 7. Which function can be used to convert list to a tuple A) Tuple. B) List. C) To list. D) To tuple. Show Answer Correct Answer: A) Tuple. 8. What is the output of program below?mariana ..... islands = ['Saipan', 'Tinian', 'Rota']del mariana ..... islands[0]print(mariana ..... islands) A) ['Saipan', 'Tinian', 'Rota']. B) ['Tinian', 'Rota']. C) ['Saipan', 'Tinian']. D) ['Saipan', 'Rota']. Show Answer Correct Answer: B) ['Tinian', 'Rota']. 9. In which part of memory does the system store the parameter and local variables of a function call? A) Heap. B) Stack. C) Uninitialized data segment. D) None of the above. Show Answer Correct Answer: A) Heap. 10. Look at the following code:name = "John"age = 23What type of data is stored in the variable name? A) Str. B) Int. C) Float. D) Nothing. Show Answer Correct Answer: A) Str. 11. ..... statement are used to assign a value to a variable. A) Assignment. B) String. C) Logical. D) Relational. Show Answer Correct Answer: A) Assignment. 12. Name the keyword used to define a function. A) Define. B) Def. C) Function. D) Fu. Show Answer Correct Answer: B) Def. 13. In the following code, what type of variable is being created?foo = "3" A) Integer. B) Float. C) String. D) None of the above. Show Answer Correct Answer: C) String. 14. Which of these in not a core data type? A) Lists. B) Dictionary. C) Tuples. D) Class. Show Answer Correct Answer: D) Class. 15. Which logical operator is used to combine two conditions and returns True if at least one condition is True? A) Xor. B) Not. C) And. D) Or. Show Answer Correct Answer: D) Or. 16. A file or set of files with related variables, functions, and classes that can be reused in other programs defines A) Loop. B) Module. C) Comments. D) Expression. Show Answer Correct Answer: B) Module. 17. Look at the following code:name = input ("What is your name? ")name = input ("What is your age? ")If the user answered "John" to the first question and "23" to the second, what type of data is in name? A) Str. B) Int. C) Float. D) None of the above. Show Answer Correct Answer: A) Str. 18. Mathematical operations can be performed on a string A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 19. In which year Python was developed A) 1992. B) 1994. C) 1991. D) 1993. Show Answer Correct Answer: C) 1991. ← PreviousRelated 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