Processing math: 100%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Engineering LibreTexts

7: Loops and Repetition

( \newcommand{\kernel}{\mathrm{null}\,}\)

  • 7.1: Do While Loop
    There are two commonly used test after loops in the iteration (or repetition) category of control structures. They are: do while and repeat until.
  • 7.2: While Loop
    The concept of iteration is connected to possibly wanting to repeat an action. Like all control structures we ask a question to control the execution of the loop. The term loop comes from the circular looping motion that occurs when using flowcharting.
  • 7.3: For Loop
    There are two commonly used test before loops in the iteration (or repetition) category of control structures. They are: while and for. This module covers the: for.
  • 7.4: Range -Based Loops
  • 7.5: Nested For Loops
    In our example we nested if then else control structures. Nesting could have an if then else within a while loop. Thus, the concept of nesting allows the mixing of the different categories of control structures.
  • 7.6: Practice Counting Loops


This page titled 7: Loops and Repetition is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Sandra Ruiz.

  • Was this article helpful?

Support Center

How can we help?