Submission of hw 2

Submitting homework 2. Took me a while to complete. The file open() using the option 'rb' tripped me up, I was using the default 'r'.