I'm guessing that most problems match some practice test problem nearly word for word.
The binary to other base problem will almost definitely be on the test.
There will probably be a variant of problem 9 that uses the exception handling he talked about on Friday.
try:
some code
except Exception as x:
print 'some code was so horrid\nit gave me some {}.'.format(x)
finally:
print 'is done'
He may want us to code for specific exception types such as IOError.
Exception is a catchall for any type of error. And except can stand alone.
try:
0/1
except:
print 'there was an error.'
That is the simplest form. It's worth remembering because it's very useful, at least in python or any language that has error handling. Because sometimes it may be more efficient to handle a predictable error than to prevent it in all cases.