Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

Under what circumstances will one choose the FOR loop instead of WHILE loop?

Give circumstances under which one will choose the FOR loop instead of WHILE loop.

Answers


Maurice
(i) FOR loop is chosen over WHILE loop when the number of repetitions are known in advance.

(ii) This is when the number of repetitions is not known in advance.

(iii) When no operations should be done if the condition is not met.
maurice.mutuku answered the question on April 21, 2018 at 12:33

Answer Attachments

Exams With Marking Schemes

Related Questions