Lesson 3.5 · Answer it
For vs while
2 marksYou mark it yourself against the marking points
(a) State when a programmer should use a for loop instead of a while loop. [1]
(b) Give one example of a task where a while loop is more suitable than a for loop. [1]
[2]