Outline for January 18

Due: Homework 1, due on January 18 at 11:55pm

  1. Scope: global, local, parameters [scope.py]
  2. Printing [printing.py]
  3. Calculating π using a Monte Carlo method
    1. How you do it
    2. random module
    3. Building program in modules, including testing routines
    4. First step: computing co-ordinates of dart toss [mc1.py]
    5. Second step: see if a point falls within the unit circle [mc2.py]

UC Davis seal
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