Chapter 55 - Iteration Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What does iteration mean?

A

» Means repeititon
» It is used to make a section of code repeat iteself

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

What are the 2 types of loops?

A

» Count - controlled loops
» Condition controlled loops

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

What is a loop?

A

» A repeated section of code

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

What is a count controlled loop?

A

» They run for a certain number of times

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

What is a condition controlled loop?

A

» They run as long as a Boolean expression is true

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

When do we use a count-controlled loop?

A

» When we know the number of iterations ahead of time
» We can do this using a for loop

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

When do we use a condition controlled loop

A

» When the number of iterations is not know because the variable used to determine when the interations ends is changinng withiin the interation itself

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