Language - Loop (For, While) - (Break, Continue)

1 - About

Repeating a set of actions until a certain condition (predicate) fails is the job of programming loops;

loops can take different forms, but they all satisfy this basic behavior.

A loop includes:

Each time the loop block executes, that’s called an iteration. See Design Pattern - (Iterator|Cursor)

The only practical difference between these loops is whether the conditional is tested:

  • before the first iteration (while)
  • or after the first iteration (do.. while).

3 - Loop Control Statement

  • The break statement stop a loop.
  • The continue statement goes to the next iteration without running the code below it.

4 - Infinite

See Infinite loop on the CPU

5 - Documentation / Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap