Outline for April 13, 2009

Reading: §3.5–3.7


  1. Biggest and smallest integer
    1. More about bits
    2. Show 32 bit maximum, minimum signed integer
    3. Show largest floating point number that, when added to 1, is ignored (see eps.py)
  2. Type conversion review
    1. Assignment
    2. Use of float(), int()
    3. In arithmetic
  3. Built-in functions
    1. type()
    2. range()
    3. round()
  4. Math library
    1. Making library available to program: “import math”
    2. With above form of inclusion, must prefix with “math.”
    3. With “from math import *”, don’t need “math.”
    4. Constants: pi, e
    5. Functions: log(), log10(), exp(), pow()
    6. Functions: sin(), cos(), tan(), asin(), acos(), atan(); arg in radians
  5. Program to compute sin2(x) + cos2(x) (see trig.py)