Outline for April 27, 2014

Reading: text, §19
Due: May 9, 2014 (Note extension)
  1. Homework #2, including extra credit
    1. Due date extended to May 9, 2014 (an extra week)
    2. How to do montyalways()
  2. Handling exceptions (con’t)
    1. Exceptions in a function: who handles them? [except5.py][except6.py]
    2. Using global variables as error flags [except6a.py]
    3. raise [except7.py]
  3. Common exceptions
    1. ZeroDivisionError — attempt to divide (or take the remainder of) something by 0
    2. TypeError — operation or function applied to operand of wrong type
    3. SyntaxError — Python parser encountered a malformed statement
    4. NameError — local or global name is not found
    5. ValueError — built-in function or operation applied to operator with illegal value
    6. EOFError — input function encounters an end of file
    7. Keyboard Interrupt — user hit the interrupt key (usually control-C)
  4. Review
    1. See Midterm Study Guide

You can also obtain a PDF version of this. Version of April 27, 2014 at 6:45PM