Submission: Submit the python or text file that contains all your answers to the submission folder for this lab by the end of the lab. To simplify Drew's (our tutor) work, please include your name and the number of the lab at the top of the file (if you're submitting a Python file, use comments: start the line with a #).
Grading: see the grading criteria for lab assignments.
Since we haven't seen a lot of new material (because of the midterm), this lab will mostly be about reviewing the midterm problems for practice. If you need additional challenges, there are a couple of extra bonus questions at the end.
1. (Midterm). Redo problems 1 and 4 on the midterm. Work on and discuss solutions with each other. The midterm (and the file innocents.txt) is available on d2l as part of the week 6 course content. If you did fine on the midterm look for the extra challenges below.
2. (Old Miterm) Do problem 4 on the old midterm (available on d2l as part of the week 5 course content, together with the file Romantics.csv which you'll need). If you solved this already, and did fine, look below for extra challenge.
3. (Extra credit challenges based on midterm):
Problem 1: add the following exceptions: "good" turns into "well', the following adjectives are their own adverbs: "fast", "hard", "early", "late".
Problem 4: Add a third argument: lenct(fname, lb, ub) so that the functions lists all words of length between lb and ub (inclusive). If that's too easy, add the following functionality: write all the words between length lb and ub to a file (on top of counting them).
Problem 4 (old): Modify the alive(year) function so it writes all the results to a new file, and for each composer also records the age they were in year year.