Outline for January 22, 2018

Reading: §4.5, 5.4, 5.5

  1. import statement
    1. import math [hypotnoex1.py]
    2. Need the “math.” before “sqrt”
    3. from math import sqrt [hypotnoex.py]
    4. Do not need the “math.” before “sqrt”
    5. For the homework, use math.exp(t) to compute et
    6. Now add in exception handling [hypotex.py]
  2. continue and break statements in loops [loop1.py]
  3. Full version of the hypotenuse program [pythag1.py]

Matt Bishop
Department of Computer Science
University of California at Davis
Davis, CA 95616-8562 USA
Last modified: Version of January 22, 2018 at 2:46PM
Winter Quarter 2018
You can get a PDF version of this