Chapter 10


1.

Raising exceptions

e)

2.

Raising exceptions

d)

4.

Keywords

try-except monitors the try clause for exceptions and execution jumps to the matching except clause. However, the finally clause of a try-finally will be executed regardless of whether or not an exception occurred. How does the try-except-finally statement work?

5.

Exceptions (we'll provide the solution, but you have to determine why):

  1. SyntaxError

  2. IndexError

  3. NameError

  4. ZeroDivisionError

  5. ValueError

  6. TypeError



Core Python Programming
Core Python Programming (2nd Edition)
ISBN: 0132269937
EAN: 2147483647
Year: 2004
Pages: 334
Authors: Wesley J Chun

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net