24
QuizMultiple Choice

Readable Code — Unit test

Question 24 of 25 • VA-Information Technology Fundamentals B

Why is the len ( ) function useful when using a loop to iterate through a stack?

Answer
A
The len ( ) function will print the elements of the stack.
B
The len ( ) function will run with each iteration, printing the element number each time.
C
The len ( ) function will tell the program the number of elements in the stack.
D
The len ( ) function will remove the duplicate elements in the stack.
Previous
Next
Why is the len ( ) function useful when using a…