Actually finished up this course a while ago, but haven’t written it up yet. I felt a little vindicated by how easy this was, especially after getting hammered with the Discrete Optimization course I took last. I barely watched any of the videos; really just did the programming assignments.
- One on string manipulation, finding vowels or substrings
- A debt/min payment equation solver
- Hangman game
- Scrabble-like game
- Caesar cipher coding and decoding
- Parsing an RSS feed for stories matching desired keywords, etc.
Everything was pretty much fill-in-the-blank. Decent auto-grader, as seems to be the norm for these types of online programming classes.
Besides being a good Python review, I did learn more about properly working with dictionaries:
Remember that with a dictionary, the usual way to access a value is
'a'is the key we want to find. However, this only works if the key is in the dictionary; otherwise, we get a
KeyError. To avoid this, we can use the call
hand.get('a',0). This is the “safe” way to access a value if we are not sure the key is in the dictionary.
d.get(key,default)returns the value for
keyis in the dictionary