Iteration Flashcards

1
Q

What is ‘iteration’?

A

Repeating the same process until stopped.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is ‘iteration’ used?

A

To create loop statements.

Ex:
1| arrived = False
2| WHILE arrived == False
3| PRINT(“Are we nearly there yet?”)
4| ENDWHILE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are ‘condition-controlled’ iterations?

(aka ‘indefinite iteration’)

A

When a set of instructions are repeated based on whether a condition evaluates as True or False.

Ex: ‘while’ loops, ‘do while’ loops. and ‘repeat until’ loops

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are ‘count-controlled’ iterations?

(aka ‘definite iteration’)

A

When a set of instructions are repeated a specific number of times.

Ex: ‘for’ loops, and ‘for each’ loops.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly