This study notes covers Exam Tips 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 7 of 8 in this topic. Use this study notes to connect the idea to the wider topic before moving on to questions and flashcards.
Exam Tips
- FOR vs WHILE: FOR when you know iterations, WHILE when you don't
- Infinite loops: WHILE condition must eventually become false!
- Common mistake: Off-by-one errors (1 to 10 vs 0 to 9)
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.