This homework assignment is intended to get you comfortable using Python, especially file I/O and the data structures and types we've talked about in class. However, I fully expect that you will need some things that we haven't discussed in class for an elegant solution. Read the docs, google, and check Stack Overflow - learn to learn. Make sure you have downloaded War and Peace from the data folder and know its filepath.
This assignment is worth ten points. You should complete it in this notebook. When complete, you should email the assignment to Dr. Johnson. The due date is Wednesday, June 1, by 9:00AM. Late assignments will be penalized 1 point per day (that's one full letter grade per day late). Submission anytime after 9:00AM on June 1 counts as 1 day late.
You may discuss and work on this assignment with your peers. However, you must submit your own work, copying is not permitted. You will be graded individually, and if your work appears to be a copy of someone else's, I may ask for you to demonstrate in person and on the spot your ability to write the code to solve a similar problem.
Do all of your work in this notebook. I should be able to change the filepath to war and peace in the first cell block, after which I should be able to restart the kernel and run all cells to see the correct output. I should not need to make any other changes to the file. You should verify that you've done the work correctly by doing this yourself (restart the kernel and run all using the 'kernel' dropdown menu above).
In [ ]:
# your code here: