Outline for October 27, 2021

Reading: §7
Due: Homework 3, due November 8, 2021

  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]

UC Davis sigil
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email: mabishop@ucdavis.edu
ECS 235A, Computer and Information Security
Version of October 27, 2021 at 10:25PM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh