Outline for January 22, 2018
Reading
: §4.5, 5.4, 5.5
import
statement
import
math
[
hypotnoex1.py
]
Need the “math.” before “sqrt”
from
math
import
sqrt
[
hypotnoex.py
]
Do not need the “math.” before “sqrt”
For the homework, use
math.exp(
t
)
to compute
e
^{t}
Now add in exception handling [
hypotex.py
]
continue
and
break
statements in loops [
loop1.py
]
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