Questions

1 Marks Each

🎯

Test yourself on this topic

25 questions · timed · auto-graded

Question 11 Mark
Write a Python program to select the even items of a list.
Answer
# filename:ch-datas-P_Q4

x = [1, 2, 3, 4, 5, 6, 7, 8, 9]

print(x[1::2])

View full question & answer
Question 161 Mark
A list contains LST=[10,7,9,15,12]. 8 is added to the list. What will be the output? If

(a) LST as Stack (b) LST as Queue

Answer
(a) LST as Stack

LST = [8,10,7,9,15,12]

(b) LST as Queue

LST = [10,7,9,15,12,8]

View full question & answer
Question 171 Mark
Name some applications of Queue.
Answer
Application of Queue are:
(a) When a resource is shared among multiple users.
For Example: Printer
(b) Ticket counter at Railway station.
View full question & answer
Question 181 Mark
Name some applications of Stack.
Answer
Application of Stack are:
(a) Reverse of a String or Line.
(b) Function call routines.
(c) Backtracking
View full question & answer
Question 191 Mark
What do you mean by Enqueue and Dequeue?
Answer
Enqueue : Insertion of an element in the Queue.
Dequeue : Deletion / Removal of an element from the queue.
View full question & answer
Question 251 Mark
Define data structure.
Answer
It is a way to store a collection of related data together. The data structure can be implemented via the list, dictionary, tuple, set etc.
View full question & answer
1 Marks Each - Computer Science STD 12 Commerce Questions - Vidyadip