Question
Complete the is_empty method for a stack implemented
using a Python list. class Stack: Â Â def __init__(self): Â Â Â Â self._items = [] Â Â def push(self, item): Â Â Â Â self._items.append(item) Â Â def pop(self): Â Â Â Â if not self.is_empty(): Â Â Â Â Â Â return self._items.pop() Â Â Â Â else: Â Â Â Â Â Â raise IndexError("Stack is empty") Â Â def is_empty(self): Â Â Â Â _________ # Line to completeSolution
The correct answer is A
What will come in place of the question mark (?) in the following series?
111, 109, 115, ?, 211, -509
7    8     ?     13     17     22    28
...138, 140, 152, 174, ?, 248
What will come in place of the question mark (?) in the following series?
17, 81, 131, 169, 197, ?
5, 12, 24, 36, 52, ?
23, 39, 64, 100, ?, 213
Find the missing number, in the given number series.
42, 52, 72, 112, 192, ?
What value should come in the place of (?) in the following number series?
300, 421, 252, ?, 188, 549
[(145)² ÷ 25 × 52] ÷ ? = 29 × 13
17, 9, ?, 13.5, 25, 65