Advertisements
Advertisements
Question
Look at the following code:
def x (firstQueue):
if len(firstQueue)==0:
return True
else:
return False
What does x represent?
Options
peek() function
size() function
dequeue() function
isEmpty() function
MCQ
Advertisements
Solution
isEmpty() function
Explanation:
x represents isEmpty() function because the function only checks whether the length is 0 or not.
shaalaa.com
Is there an error in this question or solution?
