Podcast
Questions and Answers
Which statement accurately describes the behavior of a 'while' loop?
Which statement accurately describes the behavior of a 'while' loop?
- C. It loops until a break statement is executed within its indented code block.
- B. It iterates over a series of values.
- A. It loops while a condition is true. (correct)
- D. It loops until a condition is true.
Which behavior is NOT exhibited by a 'while' loop?
Which behavior is NOT exhibited by a 'while' loop?
- B. It iterates over a series of values. (correct)
- D. It loops until a condition is true.
- A. It loops while a condition is true.
- C. It loops until a break statement is executed within its indented code block.
What causes a 'while' loop to stop executing?
What causes a 'while' loop to stop executing?
- B. The code block is indented incorrectly.
- D. The loop reaches a specified number of iterations.
- C. A break statement is executed within the loop.
- A. The condition evaluates to false. (correct)