Loop


A sequence of instructions in a program repeated until a certain condition[1] is reached:

* with a “for loop[2]”, the instructions are repeated a certain number of times
* with a “while” loop, the instructions are repeated until a given condition becomes false
* with a “forever loop” (also known as an “infinite” or “endless” loop), the instructions are repeated endlessly.

Terms definitions
1. condition. A statement that a program checks to see if it is true or false. If true, an action is taken. Otherwise, the action is ignored. Related Articles: Laser Tower that automatically attacks targets within range using (draw line in game)Progress Outcomes – Computational Thinking MatrixGlossary: IterateGlossary: Feedback4 My program doesn’t work (Debugging)11 Iteration – Loops […]
2. loop. A sequence of instructions in a program repeated until a certain condition is reached: * with a “for loop”, the instructions are repeated a certain number of times * with a “while” loop, the instructions are repeated until a given condition becomes false * with a “forever loop” (also known as an “infinite” or “endless” […]