Loops Flashcards

1
Q

What are the 3 steps of using a loop?

A
  1. Initialize the loop control variable before entering the loop
  2. Provide a condition that controls the loop
  3. Alter the loop control variable within the loop, so that eventually the condition will become false, and the loop will exit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Loops Slide 15

The loop control variable will move 1 step beyond your limit. The 4th count in this slide is a necessity.

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