This study notes covers Loop Types within Iteration (Loops) for GCSE Computer Science. Revise Iteration (Loops) in 3.2 Programming for GCSE Computer Science with 15 exam-style questions and 8 flashcards. This topic shows up very often in GCSE exams, so students should be able to explain it clearly, not just recognise the term. It is section 3 of 8 in this topic. Use this study notes to connect the idea to the wider topic before moving on to questions and flashcards.
Loop Types
| Loop Type | Use When | Checks Condition |
|---|---|---|
| FOR | Know how many times to repeat | Count-controlled |
| WHILE | Repeat while condition is true (may run 0 times) | Before each iteration |
| DO-WHILE | Always run at least once | After each iteration |
Practice questions for Iteration (Loops)
Which type of loop is best used when you know exactly how many times the loop should repeat?
Explain what an infinite loop is, state one cause of an infinite loop, and describe one consequence of running an infinite loop in a program.