This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 25 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 25 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. How do you insert a new node at the beginning of a singly linked list in Python? A) Create a new node and set its next reference to the current head, then update the head to the new node. B) Traverse to the end of the list and add the new node there. C) Replace the data in the head node with the new data. D) Use the insert() method provided by Python lists. Show Answer Correct Answer: A) Create a new node and set its next reference to the current head, then update the head to the new node. 2. In Queue we can not insert an element in between the elements that are already inserted but we can delete it. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 3. How many null pointers exists in a circular linked list? A) 0. B) 1. C) 2. D) 3. Show Answer Correct Answer: A) 0. 4. In circular linked list, insertion of node requires modification of? A) One pointer. B) Two pointer. C) Three pointer. D) None. Show Answer Correct Answer: B) Two pointer. 5. What is the way to increment the rear end of a circular queue? A) (Rear+1) mod MAX. B) Rear mod MAX. C) (Front+1) mod MAX. D) (Rear-1) mod MAX. Show Answer Correct Answer: A) (Rear+1) mod MAX. 6. What is the main difference between a list and a tuple in Python? A) Tuples are created using square brackets while lists use parentheses. B) Lists are faster than tuples in all operations. C) The main difference is that lists are mutable and tuples are immutable. D) Lists can contain only numbers while tuples can contain any data type. Show Answer Correct Answer: C) The main difference is that lists are mutable and tuples are immutable. 7. Compression techniques can be used on the keys to reduce both space and time requirements in a B-tree. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 8. It is used to implement an associative array, a structure that can map keys to values. A) Linked list. B) Hashing. C) Trees. D) Array. Show Answer Correct Answer: B) Hashing. 9. How many nodes does a full binary tree with n leaves contains? A) 2*n-1. B) 2$^{n }$. C) N. D) N-1. Show Answer Correct Answer: A) 2*n-1. 10. The elements in a queue are added at one end called ..... A) Front. B) Rear. C) Near. D) None of above. Show Answer Correct Answer: B) Rear. 11. Which is a Linear data structure? A) Linked List. B) Tree. C) Graph. D) All of these. Show Answer Correct Answer: A) Linked List. 12. Which of the following data structure is linear type? A) Stack. B) Array. C) Queue. D) All of the above. Show Answer Correct Answer: D) All of the above. 13. The disadvantage in using a circular linked list is ..... A) It is possible to get into infinite loop. B) Last node points to fist node. C) Time consuming. D) Requires more memory space. Show Answer Correct Answer: A) It is possible to get into infinite loop. 14. What is the syntax for creating a dictionary in Python? A) \{key:value\}. B) [key, value]. C) (key, value). D) \{key; value\}. Show Answer Correct Answer: A) \{key:value\}. 15. A linked list is a collection of A) Data. B) Nodes. C) Arrays. D) Pointers. Show Answer Correct Answer: B) Nodes. 16. Consider an undirected graph with weighted edges, where the weights represent the cost of traversal between nodes. You are tasked with finding the path between two nodes with the minimum total cost. Which traversal algorithm is more suitable for this scenario? A) BFS. B) DFS. C) Both DFS and BFS. D) It depends on specific graph. Show Answer Correct Answer: A) BFS. 17. What is list comprehension in Python? A) List comprehension is a method for sorting dictionaries in Python. B) List comprehension in Python is a syntactic construct for creating lists based on existing lists, using a compact syntax. C) List comprehension allows for the creation of tuples from lists in Python. D) List comprehension is a way to define functions in Python. Show Answer Correct Answer: B) List comprehension in Python is a syntactic construct for creating lists based on existing lists, using a compact syntax. 18. To perform level-order traversal on a binary tree, which of thefollowing data structure will be required? A) Hash table. B) Queue. C) Binary search tree. D) Stack. Show Answer Correct Answer: B) Queue. 19. The operation to arrange all elements in required order is called: A) Search. B) Insertion. C) Sorting. D) Merging. Show Answer Correct Answer: C) Sorting. 20. How are String represented in memory in C? A) LinkedList of characters. B) The object of some class. C) An array of characters. D) Same as other primitive data types. Show Answer Correct Answer: C) An array of characters. 21. For 'Calculating Surface Area and Volume' activity, what type of function design would be most appropriate? A) A function that stores results in global variables. B) Two separate functions, one for each calculation. C) A function that only prints results without returning values. D) One function that calculates both values and returns a tuple. Show Answer Correct Answer: D) One function that calculates both values and returns a tuple. 22. Which method is used to view the first few rows of a DataFrame? A) Df.column name. B) Df[ "column name" ]. C) Df.select( "column name" ). D) Both A and B. Show Answer Correct Answer: D) Both A and B. 23. The number of elements in the adjacency matrix of a graph having 7 vertices is A) 7. B) 14. C) 49. D) 34. Show Answer Correct Answer: C) 49. 24. Which syntax correctly creates a dictionary? A) Student = \{"name": "Alex", "gpa":3.5\}. B) Student = ["name", "Alex"]. C) Student = ("name", "Alex"). D) Student = \{"name", "Alex"\}. Show Answer Correct Answer: A) Student = \{"name": "Alex", "gpa":3.5\}. 25. You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list? A) Delete the First element. B) Inser a new element as the first element. C) Delete the last element. D) Add a new element at the end of the list. Show Answer Correct Answer: C) Delete the last element. ← 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