Computer Science for IGCSE & O level - Programming (Section 14 - No. 16)

What is the function of a 'FOR' loop in programming?
To execute a block of code repeatedly a specific number of times.
To define variables
To store data in files
To get input from the user.

Explanation

FOR loops repeat a block of code a set number of times, based on a counter or range.

Comments (0)

Advertisement