Concept Flow - While–else behavior
Start: Initialize condition
Check condition
Execute body
Update condition
↩Back to Check condition
The while loop runs as long as the condition is true. If it ends normally (condition false), the else block runs. If the loop exits early (break), else is skipped.