Homework 1 Download

Please click the link at the top of the page to download. The included shakespeare.txt file included within is the one I used for the in-class demo. It’s not part of the assignment.

Part 1

Go through the following pages on the Learn Python tutorial:

Part 2

Do the problems in hw01.py. The assignment is self graded. To test yourself, run the following on the command line:

$ python3 -m doctest hw01.py -v

If you passed the tests, you should see the following:

3 items passed all tests:
   4 tests in hw01.plus_twenty
   2 tests in hw01.print_and_return_me
   2 tests in hw01.print_me
8 tests in 4 items.
8 passed and 0 failed.

If any tests fail, information about what exactly failed will be displayed. To fix your problem, try testing things out in the interpreter!

If you experience any issues with grading, first make sure you are in the correct folder. You may have to use cd to change directories, and use ls to make sure the file is there.