for vs while
use a for loop when your program “knows” exactly how many times to loop
use a while loop when there is a condition that will terminate your loop
Previous slide
Next slide
Back to first slide
View graphic version