Outline for November 3, 2022

Reading: §7.7
Assignments: Homework 3, due November 10, 2022


  1. Handling exceptions
    1. except [except0.py]
    2. except exceptcode [except1.py]
    3. else [except2.py]
    4. except exceptcode as msgvar [except3.py]
    5. finally [except4.py]
    6. Exceptions in a function: who handles them? [except5.py, except6.py]
    7. Using global variables as error flags [except7.py]
    8. raise exceptcode message [except8.py]

  2. Writing a program to play rock-paper-scissors: top-down design
    1. Problem statement and general algorithm idea
    2. Data representation and program structure [rps-1.py]
    3. Figure out who wins [rps-2.py]
    4. Get computer choice [rps-3.py]
    5. Get user input [rps-4.py]
    6. Make it user-friendly [rps-5.py]

  3. Writing a program to compute permutations of list elements
    1. Problem statement and general algorithm idea
    2. Data representation and program structure
    3. Put it into Python [perm.py]

UC Davis sigil
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email: mabishop@ucdavis.edu
MHI 289I, Programming in Health Informatics
Version of November 3, 2022 at 12:22PM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh