3.0k views
5 votes
Which is an essential feature of a while loop having the following form?while(LoopExpression){loopBody}

1 Answer

5 votes

Step-by-step explanation:

The essential feature of a while loop having the following form: 'while(LoopExpression){loopBody}' is the loop expression.

The loop expression is evaluated before each iteration of the loop. If the loop expression evaluates to 'True', the loop body is executed and the loop continues. If the loop expression evaluates to 'False', the loop terminates and the program continues with the next statement after the loop.

Thus, the loop expression acts as a condition that controls the execution of the loop body. This allows the loop to repeat until some specified condition is met.

User Olie
by
7.3k points