Learn first
Programs follow precise instructions
A program is a set of instructions. A variable stores a value. A condition chooses between paths. A loop repeats steps. Output is the result produced.
How to work it out Trace one instruction at a time. Keep a record of values and check exactly when a condition or repeated step is evaluated.
A separate example In a separate trace, start with n = 2, add 3, then double n. The two instructions happen in order: 5 is an intermediate value before the final result.
REPEAT 3 TIMES means execute its body three times. END marks the end of that body. In this plan, DRAW DOT is inside the loop and DRAW LINE is after END, so only the dot action repeats.
Worked example
REPEAT 3 TIMES: DRAW DOT; END; DRAW LINE produces three dots followed by one line. With a repeat count of zero, the body is skipped but the later line still happens.