What kind of conditions can a while loop check?
Any boolean expression can be used to make the condition for a
while loop. In one of the earlier lessons we learned about comparators like
==, and boolean operators like
Anything that results in
False can be used as the condition for a while loop to check. The important thing is to ensure that the condition eventually results in
False at some point, otherwise you get an infinite loop!