The loop body executed three times,
with COUNT=0, COUNT=1, COUNT=2
.
Then its value is changed to 3, but the loop body does not execute again.
A loop with a loop condition can be confusing. It is a good idea to practice some more of them before moving on. Here is the program again, with a slight change:
' Loop with a loop condition ' LET COUNT = 0 'Statement 1 DO WHILE COUNT <= 5 'Statement 2 PRINT COUNT 'Statement 3 LET COUNT = COUNT + 1 'Statement 4 LOOP END
Notice that the loop condition has been changed.
What will the program print on the monitor screen?