MOAR Dictionary

by Erica Brody

05 Apr 2016

Code for Exercise 1:

Code for Exercises 2-5:

Reflection: Exercise 1 was challenging since I had gotten used to reading the files in line by line from the recent exercises and had forgotten how to use .read and putting all the words in the list. But I did feel confident in writing the code to add the items to the dictionary. I got stuck on Exercise 2 initially because I was looking for “From:” and didn’t realize that the lines I was looking for didn’t have the colon and the ones that did have the colon had only 2 elements in the line so when I was looking for the day of the week in item number 3 of the list of items in the line, there was no third item. It took a lot of print statements and patients to debug this and find the error. The rest of the exercises went ok, though I feel like I haven’t been able to retain a lot of the methods (and their syntax) that we have learned from previous weeks as well as I would like.

I am a library science student, focused on health information. I am dabbling in information science this semester. Find Erica Brody on Twitter, Github, and on the web.