Outline for January 16, 2019
Reading
: §2.10, 3.7, 6.11
Fibonacci numbers [
fib.py
]
Input
Output [
printing.py
]
Printing without format
Printing with format using
%
Printing with format using
format
method
Getting help in IDLE
continue
and
break
statements in loops [
loop1.py
]
import
statement
import math
[
hypotnoex1.py
]
Need the “math.” before “sqrt”
from math import sqrt
[
hypotnoex.py
]
Do not need the “math.” before “sqrt”
Now add in exception handling [
hypotex.py
]
Full version of the hypotenuse program
Matt Bishop
Department of Computer Science
University of California at Davis
Davis, CA 95616-8562 USA
Last modified: Version of January 15, 2019 at 8:55PM
Winter Quarter 2019
You can get a PDF version of this