Outline for April 8, 2009

Reading: §2.6–2.7


  1. Program: compute an average
    1. Show program from pseudocode (see average.py)
    2. Test and debug it
  2. Definite loops
    1. Loop that executes a specific (definite) number of times
    2. for i in range(10):
    3. for i in [1, 3, 5, 7, 9]:
    4. What range(10) translates into
  3. Program: print Fibonnaci series
    1. Formula is fn = fn−1 + fn−2; f0 = 0, f1 = 1
    2. Output is to be first 20 numbers of the series
    3. Go through design
    4. Implementation: see fib.py