For and While Loops

Explain the difference between a "FOR" and "WHILE" loop.

Expand Hint
All for loops can be written as while loops, and vice-versa. The distinction is how the entrance/exit criteria are organized for the executable code.
For loops usually execute in a predetermined range that is hard coded in (typically you know how many times the loop should run). While loops are conditional based (if this hypothetical condition is true, then perform these tasks etc).
For loops usually execute in a predetermined range that is hard coded in. While loops are conditional based.
Time Analysis See how quickly you looked at the hint, solution, and answer. This is important for making sure you will finish the FE Exam in time.
  • Hint: Not clicked
  • Solution: Not clicked
  • Answer: Not clicked