Chapter 55 - Iteration Flashcards
What does iteration mean?
» Means repeititon
» It is used to make a section of code repeat iteself
What are the 2 types of loops?
» Count - controlled loops
» Condition controlled loops
What is a loop?
» A repeated section of code
What is a count controlled loop?
» They run for a certain number of times
What is a condition controlled loop?
» They run as long as a Boolean expression is true
When do we use a count-controlled loop?
» When we know the number of iterations ahead of time
» We can do this using a for loop
When do we use a condition controlled loop
» When the number of iterations is not know because the variable used to determine when the interations ends is changinng withiin the interation itself