Python Test01
Python Test01
Subject Language
Python English
Solution
Bookmark
Q. The data structure required to check whether an expression contains a balanced parenthesis is? incorrect
(a) Queue Your Ans c
(b) Stack
Correct Ans b
(c) Tree
(d) Array Time (Secs) 0
Solution
Bookmark
Q. Which of the following statement(s) about stack data structure is/are NOT correct? incorrect
(a) Top of the Stack always contain the new node
Your Ans d
(b) Stack is the FIFO data structure
Correct Ans b
(c) Null link is present in the last node at the bottom of the stack
(d) Linked List are used for implementing Stacks Time (Secs) 0
Solution
Bookmark
Q. Which of the following points is/are not true about Linked List data structure when it is compared with an array? correct
(a) Random access is not allowed in a typical implementation of Linked Lists Your Ans b
(b) Access of elements in linked list takes less time than compared to arrays
Correct Ans b
(c) Arrays have better cache locality that can make them better in terms of performance
(d) It is easy to insert and delete elements in Linked List Time (Secs) 0
Solution
Bookmark
Q. Which of the following application makes use of a circular linked list? incorrect
(a) Recursive function calls
Your Ans a
(b) Undo operation in a text editor
Correct Ans d
(c) Implement Hash Tables
(d) Allocating CPU to resources Time (Secs) 0
Solution
Bookmark
Solution
Bookmark
Q. Which of the following tree data structures is not a balanced binary tree? incorrect
(a) Splay tree Your Ans d
(b) B-tree
Correct Ans b
(c) AVL tree
(d) Red-black tree Time (Secs) 0
Solution
Bookmark
Bookmark
Solution
Bookmark
Q. Which of the following Python code will give different output from the others? correct
(a) for i in range(0,5):
Your Ans c
print(i)
Correct Ans c
(b) for j in [0,1,2,3,4]:
print(j) Time (Secs) 0
(c) for k in [0,1,2,3,4,5]:
Bookmark
print(k)
(d) for l in range(0,5,1):
print(l)
Solution
Q. Which one of the following is a valid Python if statement : correct
(a) if a>=2 :
Your Ans a
(b) if (a >= 2)
Correct Ans a
(c) if (a => 22)
(d) if a >= 22 Time (Secs) 0
Solution
Bookmark
Copyright ©️2024 Campus Credentials. All rights reserved.