For iteration: a. Write iteration statements. b. Determine the result or side effect of iteration statements.

AAP-2.K.1 Iteration statements change the sequential flow of control by repeating a set of statements zero or more times, until a stopping condition is met.

AAP-2.K.2 The exam reference sheet provides

Text:

REPEAT n TIMES
{
   <block of statements>
}

Block:

REPEAT n TIMES
   block of statements

in which the block of statements is executed n times.

AAP-2.K.3 The exam reference sheet provides

Text:

REPEAT UNTIL(condition)
{
   <block of statements>
}

Block:

REPEAT UNTIL condition
   block of statements

in which the code in block of statements is repeated until the Boolean expression condition evaluates to true.

AAP-2.K.4 In REPEAT UNTIL(condition) iteration, an infinite loop occurs when the ending condition will never evaluate to true.

AAP-2.K.5 In REPEAT UNTIL(condition) iteration, if the conditional evaluates to true initially, the loop body is not executed at all, due to the condition being checked before the loop.