This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 14 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 14 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following data structures can be used for parentheses matching? A) N-ary tree. B) Priority queue. C) Stack. D) Queue. Show Answer Correct Answer: C) Stack. 2. Colours = ['red', 'blue', 'yellow', 'green', 'purple']Which instruction illustrates mutability? A) Colours[2] = 'pink'. B) Colours.append('pink'). C) Colours.insert(2, 'pink'). D) Colours.remove('pink'). Show Answer Correct Answer: A) Colours[2] = 'pink'. 3. Why do we use data structure in programming language? A) For data organization. B) For stabilized mathematical and logical relationship in between the data item. C) A & B both. D) First only. Show Answer Correct Answer: C) A & B both. 4. Data in the data structures are processed by operations like insertion, deletion, sorting, merging and A) Traversing. B) Searching. C) Retrieval. D) Both A and B. Show Answer Correct Answer: D) Both A and B. 5. When does the ArrayIndexOutOfBoundsException occur? A) Compile-time. B) Run-time. C) Not an error. D) Not an exception at all. Show Answer Correct Answer: B) Run-time. 6. User perform following operations on stack of size 5 then-push(1);pop();push(2);push(3);pop();push(2);pop();pop();push(4);pop();pop();push(5); A) Overflow Occurs. B) Stack Operations will be performed Smoothly. C) Underflow Occurs. D) None of these. Show Answer Correct Answer: C) Underflow Occurs. 7. In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is (GATE CS 2002) A) Log(2*n). B) N/2. C) Log(2*n)-1. D) N. Show Answer Correct Answer: D) N. 8. The operation of processing each element in the list is known as A) Inserting. B) Traversal. C) Merging. D) Sorting. Show Answer Correct Answer: B) Traversal. 9. When should you use a dictionary? A) When you need labeled data with named fields. B) When you must preserve sorted order. C) When all values must be unique. D) When values must never change. Show Answer Correct Answer: A) When you need labeled data with named fields. 10. In Python, which operator is used for exponentiation? A) +. B) -. C) *. D) **. Show Answer Correct Answer: D) **. 11. What are the main characteristics of a set? A) A set is unordered, contains unique elements, and supports mathematical operations. B) A set is a collection of elements that can be modified. C) A set is ordered and can contain duplicate elements. D) A set only contains numeric values and no other types. Show Answer Correct Answer: A) A set is unordered, contains unique elements, and supports mathematical operations. 12. TREE[1]=NULL indicates is ..... A) Overflow. B) Empty. C) Underflow. D) Full. Show Answer Correct Answer: B) Empty. 13. Explain how to loop through a dictionary in Python. A) You can loop through a dictionary using while loops. B) You can loop through a dictionary using for key in my dict, for value in my dict.values(), or for key, value in my dict.items(). C) You can only loop through a dictionary using list comprehensions. D) Dictionaries cannot be looped through in Python. Show Answer Correct Answer: B) You can loop through a dictionary using for key in my dict, for value in my dict.values(), or for key, value in my dict.items(). 14. ..... is a way to represent data in memory. A) Data Handling. B) Data Structure. C) Data Dumping. D) Data Collection. Show Answer Correct Answer: B) Data Structure. 15. In which situation is a queue most commonly used? A) Storing elements of a tree. B) Storing elements for future processing in a first-come, first-served manner. C) Accessing elements randomly by index. D) Storing data in an unsorted manner. Show Answer Correct Answer: B) Storing elements for future processing in a first-come, first-served manner. 16. ..... operation changes the value of element given by user of the stack. A) Push. B) Pop. C) Peep. D) Update. Show Answer Correct Answer: D) Update. 17. A queue follows ..... A) FIFO (First In First Out) principle. B) LIFO (Last In First Out) principle. C) Ordered array. D) Linear tree. Show Answer Correct Answer: A) FIFO (First In First Out) principle. 18. Which is an attribute? A) Teacher. B) Salary. C) Student. D) Employee. Show Answer Correct Answer: B) Salary. 19. In the context of the activity 'Checking Even Numbers', what logical structure would most likely be implemented within the function? A) An if-else conditional statement. B) A try-except block. C) A while loop only. D) A for loop only. Show Answer Correct Answer: A) An if-else conditional statement. 20. Algorithm is a ..... procedure. A) Shortcut. B) Function. C) Reverse. D) Step by step. Show Answer Correct Answer: D) Step by step. 21. Insertion in Queue is done at ..... end, and deletion is at ..... end A) Start, last. B) Front, rear. C) Rear, front. D) Begin, stop. Show Answer Correct Answer: C) Rear, front. 22. The decision tree structure begins at a node called the ..... A) Span. B) Top. C) Root. D) Branch. Show Answer Correct Answer: C) Root. 23. Evaluate and write the result for the following postfix expressionabc*+de*f+g*+ where a=1, b=2, c=3, d=4, e=5, f=6, g=2. A) 61. B) 59. C) 60. D) 55. Show Answer Correct Answer: B) 59. 24. A data structure whose elements form a sequence is known as A) Heterogeneous data structure. B) Homogeneous data structure. C) Linear data structures. D) Non-Linear data structures. Show Answer Correct Answer: C) Linear data structures. 25. Which data structure in Python does not allow duplicate elements? A) Tuple. B) List. C) Dictionary. D) Set. Show Answer Correct Answer: D) Set. ← 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