When designing programs, there may be some instructions that need repeating. This is known as iteration, and is implemented in programming using FOR and WHILE statements.
In programming, what is iteration?
The repetition of steps within a program
The order in which instructions are carried out
A decision point in a program
Why is iteration important?
It determines the order in which instructions are carried out
It allows code to be simplified by removing duplicated steps
It allows multiple paths through a program
What is iteration also known as?
In programming, what is a statement?
A statement is a block of code
A statement is a repeated instruction
A statement is a single instruction
Which statements are used to implement iteration?
IF...ELSE and WHILE
DO and WHILE
FOR and WHILE
What are the two types of iteration?
Count-controlled and condition-controlled loops
Repeat-once and condition-controlled loops
Repeat-once and repeat-many loops
Which type of loop uses a counter?
A repeat-many loop
A condition-controlled loop
A count-controlled loop
Which type of loop iterates a specified number of times?
A repeat-once loop
Which type of loop iterates until instructed otherwise?
What is the name given to a loop that continues indefinitely?
An infinite loop
A forever loop
A continuous loop