Question
How should programmers avoid creating an infinite "while" loop?
Responses
Use a "for" loop instead of a "while" loop
Use a "for" loop instead of a "while" loop
Use the "continue" keyword as the last statement in the loop body
Use the "continue" keyword as the last statement in the loop body
Make sure your loop body will eventually make the loop's logical expression False
Make sure your loop body will eventually make the loop's logical expression False
Add an "else" statement after the end of the loop
Responses
Use a "for" loop instead of a "while" loop
Use a "for" loop instead of a "while" loop
Use the "continue" keyword as the last statement in the loop body
Use the "continue" keyword as the last statement in the loop body
Make sure your loop body will eventually make the loop's logical expression False
Make sure your loop body will eventually make the loop's logical expression False
Add an "else" statement after the end of the loop
Answers
Answered by
GPT 3.5
Add an "else" statement after the end of the loop
There are no human answers yet. A form for humans to post answers is coming very soon!