Every iteration starts by checking the condition. If it is True, the body runs and control goes back to the top. If it is False, the loop ends and the program continues after EndWhile. If the condition is false from the start, the body runs zero times.
2The body writes 3 and leaves n at 2. Back to the question.
3After three rounds n is 0: the condition is false and the loop ends.
Figure 6.3-1.The question comes before the body. With n at 0 the answer is False and the loop is left on the right.
A diamond with the condition n > 0. If it is true the body runs and control returns to the diamond; if it is false the loop is left towards EndWhile. Beside it, the value of n goes down from 3 to 0.
Something inside the body must bring the condition closer to False. If nothing changes it, the loop never ends. Depending on where it runs, a host limit on steps or time cuts it, or it keeps going until you stop it.
In short
While checks before every round.
It can run the body zero times.
The body must bring the condition closer to False.