At the beginning, focus on similarities. As you advance, distinguish.
I guess I should really be putting these things up in GitHub. The way I see it, the coding journal is just a place to share the code I write or study along with any notes I have about it. It's sort of a documentation LiveJournal, if you will. Anyway, this is a "study" for my project idea: create an app that will prompt the user for two dates, then calculate the difference between them. The burden of this study is twofold: (1) convert dates in standard American form (e.g. December 15, 1993) into dates in standard American numeric form (e.g. 12/15/1993); (2) create a numerical representation of the date. To process the date, I started with a list of the months. I then used a loop to create a dictionary that would attach a value to each month. Next I had to parse the user entry (I haven't added any debugging for incorrect entries yet). I did so by splitting the entry into "raw" data. I used my dictionary to process the month name into a number, str...
Comments
Post a Comment