3. Loops and Algorithms
In this chapter we demonstrate the use of loops
(for
, while
, do while
). We
also explore simple algorithms that implement a computation using a
loop.
Learn to write and validate your own code
(revised September 1, 2025)