Chapter 13 Web dict exercise

by Elliott Hauser

12 Apr 2016

Change the code below to print a readout of your own design with what you consider to be the most relevant pieces of data. Your program should not print out a raw dict/json, but rather a nicely formatted, human-readable summary of at least 4 pieces of information about the location the user has input.

Add error checking so your program does not traceback if the data you chose (like country code) does not exist for a location.

When testing, pick a wide range of locations, “27707” “New York” “Atlantic Ocean” “Chapel Hill, NC” etc., to make sure your program is robust.

Elliott Hauser is a PhD Student in information science at UNC Chapel Hill. He's hacking education as one of the cofounders of Trinket.io. Find Elliott Hauser on Twitter, Github, and on the web.