Outline for January 18
Due
: Homework 1, due on January 18 at 11:55pm
Scope: global, local, parameters [
scope.py
]
Printing [
printing.py
]
Calculating π using a Monte Carlo method
How you do it
random
module
Building program in modules, including testing routines
First step: computing co-ordinates of dart toss [
mc1.py
]
Second step: see if a point falls within the unit circle [
mc2.py
]
Matt Bishop
Office: 2209 Watershed Science
Phone: +1 (530) 752-8060
Email:
mabishop@ucdavis.edu
You can also obtain a PDF version of this.
Version of January 18, 2019 at 7:28PM