Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Engineering LibreTexts

3: Loops

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

The programs we have seen so far are straight-line code; that is, they execute one instruction after another from top to bottom. This chapter introduces one of the most important programming-language features, the for loop, which allows simple programs to perform complex, repetitive tasks. This chapter also introduces the mathematical concepts of sequence and series, and a process for writing programs, incremental development.


This page titled 3: Loops is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Allen B. Downey (Green Tea Press) via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?