This quiz works best with JavaScript enabled. Home > Class 12 > Class 12 Computer Science Chapter 1 Data Structures Using Python – Quiz 16 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 16 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. How to define a Function in Python? A) Functions in Python cannot take parameters. B) Functions are only used for mathematical calculations. C) To define a function in Python, use the syntax:'def function name(parameters):' followed by the indented function body. D) You define a function using 'function name(parameters)'. Show Answer Correct Answer: C) To define a function in Python, use the syntax:'def function name(parameters):' followed by the indented function body. 2. Which of the following applications may use a stack? A) Data Transfer between two asynchronous process. B) A parentheses balancing program. C) Tracking of local variables at run time. D) Compiler Syntax Analyzer. Show Answer Correct Answer: A) Data Transfer between two asynchronous process. 3. What will be the result of the below given expression in prefix form-+ 2 3 8 A) -3. B) 7. C) 3. D) -7. Show Answer Correct Answer: A) -3. 4. In the ..... traversal we process all of a vertex's descendants before we move to an adjacent vertex. A) Depth Limited. B) Breadth First. C) Width First. D) Depth First. Show Answer Correct Answer: D) Depth First. 5. What is the purpose of a data structure in programming? A) To define constants. B) To store and organise data efficiently. C) To perform mathematical calculations. D) To write comments in code. Show Answer Correct Answer: B) To store and organise data efficiently. 6. What is the primary data structure in Pandas used for representing tabular data? A) List. B) DataFrame. C) Tuple. D) Dictionary. Show Answer Correct Answer: B) DataFrame. 7. Which of the following is the postfix of the expression A+B/C*(D-A) A) ABCDA/-*+. B) +A/B*C-DA. C) ABC/DA-*+. D) +*-/ABCDA. Show Answer Correct Answer: C) ABC/DA-*+. 8. When implementing 'Greeting People' functionality, what makes a function more versatile than hardcoded text? A) Functions can accept different names as parameters. B) Functions automatically format text. C) Functions use less memory. D) Functions run faster than print statements. Show Answer Correct Answer: A) Functions can accept different names as parameters. 9. What is the optimal time complexity to count the number of nodes in a linked list? A) O(n). B) O(1). C) O(log n). D) O(n log n). Show Answer Correct Answer: A) O(n). 10. Can I add onto a dictionary after created A) Yes I am allowed to add onto a dictionary after creation. B) No, dictionaries are immutable after creation. C) All the above. D) None of the above. Show Answer Correct Answer: A) Yes I am allowed to add onto a dictionary after creation. 11. To evaluate an expression without any embedded function calls: A) One stack is enough. B) Two stacks are needed. C) As many stacks as the height of the expression tree are needed. D) A Turing machine is needed in the general case. Show Answer Correct Answer: A) One stack is enough. 12. What is the best case height of a B-tree of order n and which has k keys? A) Logn (k+1)-1. B) Nk. C) Logk (n+1)-1. D) Klogn. Show Answer Correct Answer: A) Logn (k+1)-1. 13. Which of the following properties is associated with a queue? A) First In Last Out. B) First In First Out. C) Last In First Out. D) Last In Last Out. Show Answer Correct Answer: B) First In First Out. 14. Which operation is problematic in an array? A) Insertion & Deletion. B) Updation. C) Searching. D) All of these. Show Answer Correct Answer: A) Insertion & Deletion. 15. How can you access 'Austria' from an array of countries? A) Using index 0. B) Using index 1. C) Using index 2. D) Using index 3. Show Answer Correct Answer: B) Using index 1. 16. While implementing Queue using list when we want to delete element we must use pop function as ..... A) List.pop(pos). B) List.pop(0). C) List.pop(). D) List.pop(1). Show Answer Correct Answer: B) List.pop(0). 17. Which is the type of an array? A) One dimensional. B) Two dimensional. C) Multi Dimensional. D) All of these. Show Answer Correct Answer: D) All of these. 18. The leaves of an expression tree always contain? A) Operators. B) Operands. C) Null. D) Expression. Show Answer Correct Answer: B) Operands. 19. Given the following preorder and inorder traversals of a binary tree:Preorder:M, N, O, P, Q, R, S, TInorder:O, P, Q, R, N, T, M, SReconstruct the binary tree and determine the number of values after the root node. A) 1. B) 2. C) 5. D) 4. Show Answer Correct Answer: A) 1. 20. Which Time and Space Complexity uses the O(n$^{2}$) notation? A) Quadratic. B) Linear. C) Exponential. D) Logarithmic. Show Answer Correct Answer: A) Quadratic. 21. Data Structure is a particular way of storing and organizing data in a computer so that it can be used efficiently. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 22. What is the maximum number of keys that a B+-tree of order 3 and of height 3 have? A) 1. 3. B) 2. 80. C) 3. 27. D) 4. 26. Show Answer Correct Answer: D) 4. 26. 23. Count = 0 while count < 3:print("Hello!") count += 1 A) Hello! (printed 1 time). B) Hello! (printed 2 times). C) Hello! (printed 3 times). D) Infinite Hello! (keeps printing without stopping). Show Answer Correct Answer: C) Hello! (printed 3 times). 24. What is a queue and how does it differ from a stack? A) A queue is a LIFO data structure, while a stack is a FIFO data structure. B) A queue is a FIFO data structure, while a stack is a LIFO data structure. C) A queue allows random access, while a stack does not. D) A queue is a data structure that only allows insertion at the front. Show Answer Correct Answer: B) A queue is a FIFO data structure, while a stack is a LIFO data structure. 25. A data structure in which elements can be inserted or deleted at/from both ends but not in the middle is? A) Priority queue. B) Dequeue. C) Circular Queue. D) Queue. Show Answer Correct Answer: B) Dequeue. ← 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