This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 3 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 3 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What is a List? A) An unordered collection of immutable items. B) A collection of distinct/unique items. C) An ordered collection of mutable items. D) A collection of key/value pairs. Show Answer Correct Answer: C) An ordered collection of mutable items. 2. The examples of Linear Data Structures are A) Stacks, Queues, Linked list. B) Int, float, complex. C) Operators, tokens, punctuators. D) Tree, graph. Show Answer Correct Answer: A) Stacks, Queues, Linked list. 3. Which type of array is the following example?score = [5, 7, 0, 10, 8, 3, 7, 3] A) 1D. B) 2D. C) 3D. D) 4D. Show Answer Correct Answer: A) 1D. 4. In which situation would you use a stack for evaluating an expression? A) To evaluate a postfix expression. B) To evaluate an infix expression. C) To evaluate a prefix expression. D) All of the above. Show Answer Correct Answer: A) To evaluate a postfix expression. 5. What is meant by 'declaring' an array? A) Create an array in a program, specifying its name and size. B) Creating a program, specifying its size. C) Create a program, specifying its name. D) Create an array to assign to a Selection process. Show Answer Correct Answer: A) Create an array in a program, specifying its name and size. 6. What kind of linked list is best to answer question like "What is the item at position n?" A) Singly linked list. B) Doubly linked list. C) Circular linked list. D) Array implementation of linked list. Show Answer Correct Answer: D) Array implementation of linked list. 7. In algorithm variable names should be in capital letters. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 8. Describe the characteristics of a stack data structure. A) A stack is characterized by LIFO order, operations like push and pop, and can be implemented using arrays or linked lists. B) A stack can only be implemented using hash tables or trees. C) A stack allows random access to elements like an array. D) A stack is characterized by FIFO order and only allows peek operations. Show Answer Correct Answer: A) A stack is characterized by LIFO order, operations like push and pop, and can be implemented using arrays or linked lists. 9. How do you convert a list to a set? A) Array(your list). B) Set(your list). C) List(your list). D) Convert(your list). Show Answer Correct Answer: B) Set(your list). 10. What operation would you use to add an element to a queue in Python? A) Put or append. B) Store or save. C) Enqueue or push. D) Add or insert. Show Answer Correct Answer: A) Put or append. 11. Which of the following is false about a binary search tree? A) The left child is always lesser than its parent. B) The right child is always greater than its parent. C) The left and right sub-trees should also be binary search trees. D) In order sequence gives decreasing order of elements. Show Answer Correct Answer: D) In order sequence gives decreasing order of elements. 12. Which data structure in Python is used to store key-value pairs? A) List. B) Dictionary. C) Set. D) Tuple. Show Answer Correct Answer: B) Dictionary. 13. How do you remove a key-value pair from a dictionary? A) Use 'key.remove(dict)'. B) Use 'dict.delete(key)'. C) Use 'del dict[key]' or 'dict.pop(key)'. D) Use 'dict.remove(key)'. Show Answer Correct Answer: C) Use 'del dict[key]' or 'dict.pop(key)'. 14. Consider an array of integers:[10, 25, 30, 45, 50, 65, 70, 85]. If you are searching for element 10, which searching technique would be most efficient A) Linear Search. B) Binary Search. C) Hashing. D) Jump Search. Show Answer Correct Answer: A) Linear Search. 15. A node contains A) Pointer. B) Data Value. C) Both Pointer & Data Value. D) None of these. Show Answer Correct Answer: C) Both Pointer & Data Value. 16. In stack we can not insert an element in between the elements that are already inserted. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 17. What data structure in Python follows the Last In First Out (LIFO) principle? A) Queue. B) Array. C) Stack. D) Heap. Show Answer Correct Answer: C) Stack. 18. Discuss the concept of list comprehension in Python with an example. A) List comprehension is a way to create dictionaries in Python. B) List comprehension is used to create tuples in Python. C) List comprehension is a method to create classes in Python. D) List comprehension in Python is a concise way to create lists. For example:squares = [x**2 for x in range(10)]. Show Answer Correct Answer: D) List comprehension in Python is a concise way to create lists. For example:squares = [x**2 for x in range(10)]. 19. The operations performed by Stack are ..... A) Insert, delete. B) Push, pop. C) Add, delete. D) Enqueue and dequeue. Show Answer Correct Answer: B) Push, pop. 20. The ..... function is used to delete all the elements in a dictionary. A) Clear( ). B) Delete. C) Delete(). D) A & c. Show Answer Correct Answer: A) Clear( ). 21. How do you create a tuple in Python? A) Using square brackets, e.g., [1, 2, 3]. B) Defining a tuple with the tuple() function, e.g., tuple(1, 2, 3). C) Creating a list with curly braces, e.g., \{1, 2, 3\}. D) You create a tuple in Python by using parentheses, e.g., (1, 2, 3). Show Answer Correct Answer: D) You create a tuple in Python by using parentheses, e.g., (1, 2, 3). 22. It use pointer to link nodes. A) Variable. B) Link List. C) Pointer. D) Trees. Show Answer Correct Answer: B) Link List. 23. What is pointer in C language? A) It stores integer variables. B) It stores character variables. C) It stores the address of the variable. D) It stores string variables. Show Answer Correct Answer: C) It stores the address of the variable. 24. What type of queue allows insertion and deletion of elements at both ends? A) Simple Queue. B) Circular Queue. C) Priority Queue. D) Double-Ended Queue (Deque). Show Answer Correct Answer: D) Double-Ended Queue (Deque). 25. How do you create a two-dimensional list in Python? A) My list = [1, 2, 3; 4, 5, 6; 7, 8, 9]. B) My list = (1, 2, 3), (4, 5, 6), (7, 8, 9). C) My list = [[1, 2, 3], [4, 5, 6], [7, 8]]. D) My list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. Show Answer Correct Answer: D) My list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. ← 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 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 10Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books