0% found this document useful (0 votes)
5 views4 pages

Python Test01

Uploaded by

RAZ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

Python Test01

Uploaded by

RAZ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Score Overview [javascript:void(0)] Subject Wise [javascript:void(0)] Question Wise [javascript:void(0)] Time Wise [javascript:void(0)]

Compare with Topper [javascript:void(0)] Solution [javascript:void(0)]

Subject Language
Python English

Q. What is a data structure? correct


(a) A programming language
Your Ans c
(b) A collection of algorithms
Correct Ans c
(c) A way to store and organize data
(d) A type of computer hardware Time (Secs) 0

Solution
 Bookmark

Q. What are the disadvantages of arrays? incorrect


(a) Index value of an array can be negative Your Ans c
(b) Elements are sequentially accessed
Correct Ans d
(c) Data structure like queue or stack cannot be implemented
(d) There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size Time (Secs) 0
Solution
 Bookmark

Q. Which data structure is used for implementing recursion? incorrect


(a) Stack
Your Ans c
(b) Queue
Correct Ans a
(c) List
(d) Array Time (Secs) 0
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 is not the application of stack? incorrect


(a) Data Transfer between two asynchronous process Your Ans c
(b) Compiler Syntax Analyzer
(c) Tracking of local variables at run time Correct Ans a
(d) A parentheses balancing program 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

Q. Which algorithm is used in the top tree data structure? correct


(a) Backtracking Your Ans b
(b) Divide and Conquer
Correct Ans b
(c) Branch
(d) Greedy Time (Secs) 0

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

Q. Which of the following is not used as loop in Python?


(a) for loop correct
(b) while loop Your Ans c
(c) do-while loop
Correct Ans c
(d) None of the above
Solution Time (Secs) 0

 Bookmark

Q. Which of the following is False regarding loops in Python? incorrect


(a) Loops are used to perform certain tasks repeatedly. Your Ans c
(b) While loop is used when multiple statements are to executed repeatedly until the given condition becomes False
Correct Ans b
(c) While loop is used when multiple statements are to executed repeatedly until the given condition becomes True.
(d) for loop can be used to iterate through the elements of lists. Time (Secs) 0
Solution
 Bookmark

Q. Which of the following is True regarding loops in Python? correct


(a) Loops should be ended with keyword "end" Your Ans c
(b) No loop can be used to iterate through the elements of strings.
Correct Ans c
(c) Keyword "break" can be used to bring control out of the current loop.
(d) Keyword "continue" is used to continue with the remaining statements inside the loop Time (Secs) 0

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.

You might also like