Outline for May 4, 2009

Reading: §8.1–8.3


  1. Reviewing for loops
    1. Syntax of a for loop
    2. Use of range(low, high, inc)
    3. Use of a list
    4. Example: for.py
  2. Indefinite loops
    1. while loop syntax
    2. while loops that are equivalent to for loops (see while.py)
    3. Infinite loops
  3. Interactive loops
    1. Continuing loop depends on input (see inter.py)
  4. Sentinel loops
    1. Loop continues until a special value (sentinel) is reached (see sent.py)
  5. File loops
    1. Loop continues until end of file reached (see fileloop.py)
  6. Nested loops
    1. One loop inside another (see internest.py, fileloopnest.py)