This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 18 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 18 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What method in Python is used to check if an element is present in a set? A) Check(). B) Contains(). C) Exists(). D) In(). Show Answer Correct Answer: D) In(). 2. Can I have duplicate keys in a python dictionary? A) No, keys are all unique. B) Yes, you can!. C) Idk. D) None of the above. Show Answer Correct Answer: A) No, keys are all unique. 3. How can you convert a list of strings to their lengths using map? A) List(map(str, your list)). B) List(map(length, your list)). C) List(map(len, your list)). D) Map(len, your list). Show Answer Correct Answer: C) List(map(len, your list)). 4. Which data structure follows LIFO System? A) Stack. B) Queue. C) Linked List. D) All. Show Answer Correct Answer: A) Stack. 5. The given array is arr = \{1, 2, 4, 3\}. Bubble sort is used to sort the array elements. How many iterations will be done to sort the array? A) 4. B) 2. C) 1. D) 0. Show Answer Correct Answer: A) 4. 6. What is a complete binary tree? A) Each node has exactly zero or two children. B) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from right to left. C) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right. D) A tree In which all nodes have degree 2. Show Answer Correct Answer: C) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right. 7. Which is not a non-primitive data structure? A) Integer. B) Array. C) Character. D) Float / Real. Show Answer Correct Answer: B) Array. 8. What is the difference between a tuple and a list? A) A tuple can be changed; a list cannot be modified. B) A tuple is immutable; a list is mutable. C) A tuple is a dynamic array; a list is a fixed size. D) A tuple is a collection of unique items; a list can have duplicates. Show Answer Correct Answer: B) A tuple is immutable; a list is mutable. 9. A vertex of in-degree zero in a directed graph is called ..... A) Root vertex. B) Source vertex. C) Sink vertex. D) Articulation point. Show Answer Correct Answer: C) Sink vertex. 10. Any node is the path from the root to the node is called A) Successor node. B) Ancestor node. C) Internal node. D) None of the above. Show Answer Correct Answer: B) Ancestor node. 11. What happens when you add a duplicate to a set? A) The duplicate is ignored. B) An error occurs. C) The set becomes a list. D) The set sorts itself. Show Answer Correct Answer: A) The duplicate is ignored. 12. Five node splitting operations occurred when an entry is inserted into a B-tree. Then how many nodes are written? A) 14. B) 7. C) 11. D) 5. Show Answer Correct Answer: C) 11. 13. A graph in which all vertices have equal degree is known as ..... A) Simple graph. B) Multi graph. C) Regular graph. D) Complete graph. Show Answer Correct Answer: D) Complete graph. 14. ..... is the data structure that has collection of nodes two fields named data and link. A) Queue. B) Stack. C) Linked List. D) Circular queue. Show Answer Correct Answer: C) Linked List. 15. ..... is the method used by card sorter? A) Radix sort. B) Insertion. C) Heap. D) Quick. Show Answer Correct Answer: A) Radix sort. 16. What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0. A) 2. B) 3. C) 4. D) 5. Show Answer Correct Answer: B) 3. 17. How is an array initialized in C language? A) Int a[3] = \{1, 2, 3\};. B) Int a = \{1, 2, 3\};. C) Int a[] = new int[3]. D) Int a(3) = [1, 2, 3];. Show Answer Correct Answer: A) Int a[3] = \{1, 2, 3\};. 18. For an int of size 4 bites what is the size of arr[15] A) A. 19. B) 15. C) 60. D) 11. Show Answer Correct Answer: C) 60. 19. What is a linked list in Python? A) A built-in data type for storing key-value pairs. B) A sequence of nodes where each node contains data and a reference to the next node. C) A collection of elements stored in contiguous memory locations. D) A data structure that allows random access to elements. Show Answer Correct Answer: B) A sequence of nodes where each node contains data and a reference to the next node. 20. How do you add an element to a set? A) Use the 'add' method. B) Use the 'push' method. C) Use the 'append' method. D) Use the 'insert' method. Show Answer Correct Answer: A) Use the 'add' method. 21. What is a python dictionary? A) A data structure that is a collection of key-value pairs. B) A data structure that is a collection of unique values. C) A data structure that is a collection of idk. D) A data structure that is a collection of tulips. Show Answer Correct Answer: A) A data structure that is a collection of key-value pairs. 22. Evaluate postfix expression2 3 1 * + 9- A) -4. B) 8. C) 4. D) 6. Show Answer Correct Answer: A) -4. 23. Which of the following is the most appropriate data structure for reversing a string? A) Array. B) Queue. C) Stack. D) Linked list. Show Answer Correct Answer: C) Stack. 24. Void is ..... data type. A) Primary. B) Derived. C) User defined. D) None of above. Show Answer Correct Answer: A) Primary. 25. Complexity of Binary Search for an array of n numbers is A) Log$_{2}$n. B) Nlog$_{2n}$. C) N$^{2}$. D) N. Show Answer Correct Answer: A) Log$_{2}$n. ← PreviousNext →Related QuizzesClass 12 Computer Science Chapter 1 Data Structures Using Python Quiz 1Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 2Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 3Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 4Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 5Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 6Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 7Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 8Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 9Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books