This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 20 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 20 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Array is ..... data type. A) User defined. B) Primary. C) Derived. D) All of above. Show Answer Correct Answer: C) Derived. 2. Which of the following is the correct operator to compare two variables? A) Equal. B) =. C) :=. D) ==. Show Answer Correct Answer: D) ==. 3. What is the significance of the 'self' parameter in Python class methods? A) 'self' refers to the instance of the class and is used to access variables that belong to the class. B) 'self' is a keyword that indicates a static method in a class. C) 'self' is used to define class-level variables. D) 'self' is optional and can be omitted in class method definitions. Show Answer Correct Answer: A) 'self' refers to the instance of the class and is used to access variables that belong to the class. 4. What are the built-in data types in Python? A) Int, float, str, list, tuple, dict, set, bool. B) Float, string, object. C) Number, text, list. D) Char, array, complex. Show Answer Correct Answer: A) Int, float, str, list, tuple, dict, set, bool. 5. What is the difference between a list comprehension and a generator expression in Python? A) A list comprehension creates a list, while a generator expression creates an iterator. B) Both create lists, but a generator expression is faster. C) A list comprehension can only be used with lists, while a generator expression can be used with any iterable. D) There is no difference; they are interchangeable. Show Answer Correct Answer: A) A list comprehension creates a list, while a generator expression creates an iterator. 6. Which of the following application makes use of a circular linked list? A) Recursive function calls. B) Undo operation in a text editor. C) Implement Hash Tables. D) Allocating CPU to resources. Show Answer Correct Answer: D) Allocating CPU to resources. 7. People have used the word ..... to mean computer information that is transmitted or stored. A) Beta. B) Data. C) Database. D) None of above. Show Answer Correct Answer: B) Data. 8. Assertion(A):A stack is a LIFO data structureReason (R):Addition and deletion of items takes place at same end A) A is true and R is correct explanation. B) A is false and R is correct explanation. C) A is true and R is false. D) A is false and R is also false. Show Answer Correct Answer: A) A is true and R is correct explanation. 9. Which of the following is true about a circular queue? A) It does not allow any elements to be dequeued. B) It does not require additional memory compared to a regular queue. C) It allows for efficient use of space by reusing empty slots. D) It allows access to elements in random order. Show Answer Correct Answer: C) It allows for efficient use of space by reusing empty slots. 10. One can convert a binary tree to its mirror image by traversing it in A) Inorder. B) Preorder. C) Postorder. D) None of the above. Show Answer Correct Answer: C) Postorder. 11. What is the time complexity of a program to reverse a linked list? A) O(n). B) O(1). C) O(log n). D) O(n log n). Show Answer Correct Answer: B) O(1). 12. Which of the following highly uses the concept of an array? A) Binary Search tree. B) Caching. C) Spatial locality. D) Scheduling of Processes. Show Answer Correct Answer: C) Spatial locality. 13. Describe how to use filter to remove even numbers from a list. A) Filtered list = list(filter(lambda x:x % 2 != 0, original list)). B) Filtered list = filter(lambda x:x % 2 == 0, original list). C) Filtered list = [x for x in original list if x % 2 == 1]. D) Filtered list = list(filter(lambda x:x % 2 == 0, original list)). Show Answer Correct Answer: A) Filtered list = list(filter(lambda x:x % 2 != 0, original list)). 14. Maps in Python are known as dictionaries. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 15. How do you access values in a dictionary? A) Use dictionary.value(key) to retrieve values. B) Call dictionary.access(key) for value retrieval. C) Access values using dictionary::key. D) Use dictionary[key] or dictionary.get(key) to access values. Show Answer Correct Answer: D) Use dictionary[key] or dictionary.get(key) to access values. 16. Which of the following is NOT a basic data structure? A) Integers. B) Graphs. C) Lists. D) Arrays. Show Answer Correct Answer: B) Graphs. 17. What is a set in Python and how does it differ from a list? A) A set is a collection of unique elements, while a list is an ordered collection that can contain duplicates. B) A set is an ordered collection of elements, while a list is a collection of unique items. C) A set can contain duplicates, whereas a list cannot. D) A set is a mutable collection, while a list is immutable. Show Answer Correct Answer: A) A set is a collection of unique elements, while a list is an ordered collection that can contain duplicates. 18. What data structure can be used to check if a syntax has balanced paranthesis? A) Queue. B) Stack. C) List. D) Union. Show Answer Correct Answer: B) Stack. 19. LIFO stands for A) List of Outputs. B) Last in First Out. C) First in Last Out. D) None of them. Show Answer Correct Answer: B) Last in First Out. 20. What are the built-in data types available in Python? A) Float, string, list, set. B) Char, array, complex. C) Int, str, boolean, map. D) Int, float, str, list, tuple, dict, set, bool. Show Answer Correct Answer: D) Int, float, str, list, tuple, dict, set, bool. 21. Types of data structure are ..... A) Primitive data structure. B) Non-primitive data structure. C) Both. D) None of them. Show Answer Correct Answer: C) Both. 22. In ..... data structure data items are not in sequence. A) Non linear. B) Linear. C) Non-homogeneous. D) All of above. Show Answer Correct Answer: A) Non linear. 23. After performing these set of operations, what does the final list look contain? InsertFront(10); InsertFront(20); InsertRear(30); DeleteFront(); InsertRear(40); InsertRear(10); DeleteRear(); InsertRear(15); display(); A) 10 30 10 15. B) 20 30 40 15. C) 20 30 40 15. D) 20 30 40 15. Show Answer Correct Answer: B) 20 30 40 15. 24. Which of the following is true about linked list implementation of stack? A) In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end. B) In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from the beginning. C) Both of the above. D) None of the above. Show Answer Correct Answer: D) None of the above. 25. In ..... data structure, the data items are arranged in a linear sequence. A) Linear. B) Non linear. C) Both a and b. D) All of above. Show Answer Correct Answer: A) Linear. ← 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