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