Question Detail

BIO 107 While Loops & Control Flow Objective Question

Question

What is the most common cause of an Infinite Loop, as described in the document?
Options
A Using a <code>break</code> statement prematurely.
B The loop's condition never becomes False.
Correct Answer
C Incorrect indentation of the loop's body.
D Forgetting to initialize the loop variable.
Correct Answer

Option B is the correct answer.

Detailed Explanation

Slide 7 states: 'An Infinite Loop occurs when the condition never becomes False. This usually happens if you forget to update your variable inside the loop.'

Hint

Look at the definition of 'The Infinite Loop'.

Question Info