This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 30 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 30 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Are python lists ordered? A) Yes, they are ordered. B) No, they are not. C) Idk man. D) None of the above. Show Answer Correct Answer: A) Yes, they are ordered. 2. B-tree of order n is a order-n multiway tree in which each non-root node contains ..... A) At most (n-1)/2 keys. B) Exact (n-1)/2 keys. C) At least 2n keys. D) At least (n-1)/2 keys. Show Answer Correct Answer: D) At least (n-1)/2 keys. 3. What is a nested data structure in Python? A) A nested data structure in Python is a data structure that can only contain booleans. B) A nested data structure in Python is a data structure that can only contain strings. C) A nested data structure in Python is a data structure that can only contain integers. D) A nested data structure in Python is a data structure that can contain other data structures within it. Show Answer Correct Answer: D) A nested data structure in Python is a data structure that can contain other data structures within it. 4. For the 'Removing VOWELS' activity that uses 'char()' and 'Operator(+=)', what is the most logical sequence of operations? A) Sort characters alphabetically, then remove vowels. B) Check each character, if not a vowel, add to result string. C) Remove all characters first, then add back consonants. D) Convert to numbers, perform arithmetic, convert back. Show Answer Correct Answer: B) Check each character, if not a vowel, add to result string. 5. What is the result of pop(x) operation on the stack? A) Add x to top of stack. B) Removes x from bottom of stack. C) Add x to the stack. D) Removes x from top of stack. Show Answer Correct Answer: D) Removes x from top of stack. 6. What is the result of slicing a list using [2:5]? A) The result of slicing a list using [2:5] is a single element at index 2. B) The result of slicing a list using [2:5] is a new list containing the elements at index 2, 3, 4, and 5. C) The result of slicing a list using [2:5] is an empty list. D) The result of slicing a list using [2:5] is a new list containing the elements at index 2, 3, and 4. Show Answer Correct Answer: D) The result of slicing a list using [2:5] is a new list containing the elements at index 2, 3, and 4. 7. Process of inserting an element in stack is called ..... A) Create. B) Push. C) Evaluation. D) Pop. Show Answer Correct Answer: B) Push. 8. How can you use comprehension to create a set from a list? A) Transform with:\{item:item for item in my list\}. B) Create a set using:set(my list). C) Use set comprehension:\{item for item in my list\}. D) Use list comprehension:[item for item in my list]. Show Answer Correct Answer: C) Use set comprehension:\{item for item in my list\}. 9. Which data structure is the collection of nodes? A) Linked List. B) Array. C) Stack. D) Queue. Show Answer Correct Answer: A) Linked List. 10. In algorithm assignment operation is performed using the symbol ..... A) =. B) :=. C) ++. D) ==. Show Answer Correct Answer: B) :=. 11. In the 'Finding Sum of Array' activity, why would you use len() function within your custom function? A) To find the maximum value. B) To convert the array to a string. C) To sort the array elements. D) To determine how many elements to iterate through. Show Answer Correct Answer: D) To determine how many elements to iterate through. 12. Which of the following statement about binary tree is CORRECT? A) Every binary tree is either complete or full. B) Every complete binary tree is also a full binary tree. C) Every full binary tree is also a complete binary tree. D) A binary tree cannot be both complete and full. Show Answer Correct Answer: C) Every full binary tree is also a complete binary tree. 13. ..... operation removes the element from the top of the stack. A) Push. B) Pop. C) Update. D) None of the above. Show Answer Correct Answer: B) Pop. 14. In the following list, which item has the index number 3?["John", "Harry", "Jesse", "John", "Jairus", "Hamza"] A) "Jairus". B) "Harry". C) "Jesse". D) "John". Show Answer Correct Answer: D) "John". 15. Which one of the following node is considered the top of the stack if the stack is implemented using the linked list? A) First node. B) Second node. C) Third node. D) None of the above. Show Answer Correct Answer: A) First node. 16. Which traversal of a binary tree visits nodes in the following order:left, right, root? A) Pre-order. B) In-order. C) Post-order. D) Level-order. Show Answer Correct Answer: C) Post-order. 17. If node N is a terminal node in a binary tree then its ..... A) Right tree is empty. B) Left tree is empty. C) Both left & right sub trees are empty. D) Root node is empty. Show Answer Correct Answer: C) Both left & right sub trees are empty. 18. Can sets contain duplicate elements? A) Sets can contain only one element. B) Yes, sets can contain duplicate elements. C) No, sets cannot contain duplicate elements. D) Sets can contain elements of different data types. Show Answer Correct Answer: C) No, sets cannot contain duplicate elements. 19. For a given graph G having v vertices and e edges which is connected and has no cycles, which of the following statements is true? A) V=e. B) V = e+1. C) V + 1 = e. D) V = e-1. Show Answer Correct Answer: B) V = e+1. 20. What would be the output after performing the following operations in a Deque?Insertfront(10); Insertfront(20); Insertrear(30); Insertrear(40); Deletefront(); Insertfront(50); Deleterear(); Display(); A) 10, 20, 30. B) 50, 10, 30. C) 40, 20, 30. D) None of the above. Show Answer Correct Answer: B) 50, 10, 30. 21. How do you create a set in Python and what are its unique properties? A) You create a set in Python using set() or \{\}. Unique properties include being unordered and containing only unique elements. B) Sets are ordered collections of items. C) You create a set using list() or []. D) Sets can contain duplicate elements. Show Answer Correct Answer: A) You create a set in Python using set() or \{\}. Unique properties include being unordered and containing only unique elements. 22. Traversing each and every record exactly once is called ..... A) Insertion. B) Deletion. C) Traversing. D) Searching. Show Answer Correct Answer: C) Traversing. 23. Which of the following data structure is non linear type? A) Stack. B) Queue. C) Tree. D) Liked list. Show Answer Correct Answer: C) Tree. 24. The operation of visiting each element in the list is known as ..... A) Sorting. B) Traversing. C) Merging. D) Inserting. Show Answer Correct Answer: B) Traversing. 25. A normal queue, if implemented using an array of size MAX ..... SIZE, gets full when? A) Rear = MAX SIZE-1. B) Front = (rear + 1)mod MAX SIZE. C) Front = rear + 1. D) Rear = front. Show Answer Correct Answer: A) Rear = MAX SIZE-1. ← 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