Note - Repeat/until is not available in python!

REPEAT/UNTIL loops are very similar to WHILE loops. They allow the user to specify a condition. They require that the counter be initialized and also they require some form of loop termination.

There are two major differences -

REPEAT/UNTIL will always loop at least once. This is different to both WHILE and FOR which could never actually run.

It will only loop if the condition is false. This is different to WHILE which will only loop if the condition is true.

A=0

WHILE A<=10

PRINT A

A = A + 1

END WHILE

Converting this into a REPEAT/UNTIL -

A=0

REPEAT

PRINT A

A = A + 1

UNTIL A>10

The condition appears at the bottom to signify that the loop will always run once. Also notice that the condition has changed from A<=10 to A>10 . This is because the loop will only run if the condition is false (so we effectively inverse the condition).