PART 1
What can we do with the while statement?we can loop a number of times and execute statements inside that loop
What value needs the statement in the brackets evaluate to in order for the loop to continue?
we need loop variables to know how many times we have to repeat the block of code inside the loop
What is an infinite loop?
that is a loop that never ends
What is an iteration?
Every time we repeat the block inside the loop it is called an iteration
PART 2
When is it a good idea to use a for statement (do a for loop) instead of the while loop we learned previously?When we want to use a more simple looking format we use the for loop
How would you write a for-loop in code?
for (cnt=1 ; cnt < 5; cnt++)
What is an off-by-one error?
that is when the loop does 1 iteration too many or 1 iteration too little