This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 7 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 7 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following options is not true about the Binary Search tree? A) The value of the right child should be greater than the root node. B) The value of the left child should be less than the root node. C) The left and right subtrees should also be a binary search tree. D) None of the above. Show Answer Correct Answer: D) None of the above. 2. What is the output of the expression len(\{1, 2, 3\})? A) 2. B) 5. C) 3. D) 4. Show Answer Correct Answer: C) 3. 3. Stack Operations always performs A) Top Position. B) Bottom Position. C) Center Position. D) None of the above. Show Answer Correct Answer: A) Top Position. 4. ..... operation adds an element to the top of the stack. A) Pop. B) Push. C) Peep. D) All of the above. Show Answer Correct Answer: B) Push. 5. What is a python set? A) A data structure that is a collection of unique values. B) A data structure that is a collection of key-value pairs. C) A data structure that is a ordered. D) Idk. Show Answer Correct Answer: A) A data structure that is a collection of unique values. 6. Each key can map to several values. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 7. Discuss the concept of nested lists in Python with an example. A) Nested lists in Python are used for defining functions. B) Nested lists in Python are used for creating dictionaries. C) Nested lists in Python allow for creating a list of lists, for example:nested list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. D) Nested lists in Python are used for mathematical calculations. Show Answer Correct Answer: C) Nested lists in Python allow for creating a list of lists, for example:nested list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. 8. Which one of the following is the overflow condition if a circular queue is implemented using array having size MAX? A) Rear= MAX-1. B) Rear=MAX. C) Front=(rear+1) mod max. D) None of the above. Show Answer Correct Answer: C) Front=(rear+1) mod max. 9. Which of the following is NOT a valid use case for a priority queue? A) Job scheduling in an operating system. B) Implementing Dijkstra's shortest path algorithm. C) Sorting a list of elements. D) Reversing a string. Show Answer Correct Answer: D) Reversing a string. 10. What kind of data structure is user ..... data in the following declaration? user ..... data = ["TJ", 24, "artLover123"] A) Tuple. B) List. C) String. D) 2d List. Show Answer Correct Answer: B) List. 11. How do you iterate over the keys of a dictionary using a for loop? A) For key in my dict.items():. B) For key in my dict.values():. C) For key in my dict.keys():. D) For key in range(len(my dict)):. Show Answer Correct Answer: C) For key in my dict.keys():. 12. In the following scenarios, when will you use selection sort? A) The input is already sorted. B) A large file has to be sorted. C) Large values need to be sorted with small keys. D) Small values need to be sorted with large keys. Show Answer Correct Answer: C) Large values need to be sorted with small keys. 13. What is the value of the postfix expression 6 3 2 4 +-*: A) 1. B) 14. C) 74. D) -18. Show Answer Correct Answer: D) -18. 14. What is the data structure used to perform recursion? A) Array. B) Stack. C) Queue. D) Linked list. Show Answer Correct Answer: B) Stack. 15. A graph is a tree if and only if graph is A) Directed graph. B) Contains no cycles. C) Planar. D) Completely connected. Show Answer Correct Answer: B) Contains no cycles. 16. Which of the following statements about arrays is true? A) Arrays can store only elements of the same data type. B) Arrays can store elements of different data types. C) Arrays are dynamic in nature. D) Arrays cannot have elements of more than one dimension. Show Answer Correct Answer: A) Arrays can store only elements of the same data type. 17. In dynamic programming, the technique of storing the previously calculated values is called ..... A) Saving value property. B) Storing value property. C) Memorization. D) Mapping. Show Answer Correct Answer: C) Memorization. 18. What is the base case in a recursive function? A) The base case is the first function call in recursion. B) The base case is the maximum depth of recursion allowed. C) The base case is the part of the function that handles all inputs. D) The base case is the condition that terminates the recursion. Show Answer Correct Answer: D) The base case is the condition that terminates the recursion. 19. ..... the condition indicate the queue is empty. A) Front=Null. B) Null=Front. C) Front=Rear. D) Rear=Null. Show Answer Correct Answer: A) Front=Null. 20. This stores its elements in a hash table without a guaranteed order upon iteration. A) Set. B) HashSet. C) TreeSet. D) LinkedHashSet. Show Answer Correct Answer: B) HashSet. 21. ..... is an example of non linear data structure A) Sorting. B) Stack. C) Tree. D) Queue. Show Answer Correct Answer: C) Tree. 22. Set A = \{ 1, 3, 5, 7 \}Set B = \{ 2, 3, 4, 5 \}The difference of sets A and B (A-B) is ..... ? A) \{ 3\}. B) \{ 5 \}. C) \{ 1, 7 \}. D) \{ 3, 5\}. Show Answer Correct Answer: C) \{ 1, 7 \}. 23. What is the purpose of the 'in' keyword in Python? A) The 'in' keyword is for creating loops in Python. B) The 'in' keyword is used to import modules in Python. C) The 'in' keyword checks if a value is present in a sequence or collection. D) The 'in' keyword is used to define a function in Python. Show Answer Correct Answer: C) The 'in' keyword checks if a value is present in a sequence or collection. 24. What is the purpose of the reduce function? A) To sort an iterable in ascending order using a function. B) To map each element of an iterable to a new value using a function. C) To filter elements from an iterable based on a condition. D) To reduce an iterable to a single cumulative value by applying a function. Show Answer Correct Answer: D) To reduce an iterable to a single cumulative value by applying a function. 25. In java, array elements are stored in ..... memory locations A) Random. B) Sequential. C) Sequential & Random. D) Binary search. Show Answer Correct Answer: B) Sequential. ← 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 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