Google Directions API, Full App =============================== Contents -------- .. toctree:: :maxdepth: 1 Indices and tables ------------------ * :ref:`genindex` * :ref:`modindex` * :ref:`search` Exercise -------- For this week, the goal is to create a direction printing function that does the following: * It should accept a parsed json dictionary from last week's function. * It should return a formatted string with travel instructions: * Include the instructions, distant and duration * Also include the manuever, but replace it with an appropriate unicode arrow! * A good reference for unicode arrows is `here `_, though note that not all of them will render correctly. This will require using the :py:func:`str.format()` function. On completion of this exercise, you should have a finished application that does the following: * Accepts the arguments outlined in part 1 from the command lines * Support the output and load arguments outlined in part 3 * Print each step of a trip including arrows instead of text manuevers Hints ----- To help you get started, here is one possible signature for the output function: .. literalinclude:: directions_app.py :language: python3 :lines: 145-149 Additionally, here is the bottom of the file, where the function calls are to the file is run: .. literalinclude:: directions_app.py :language: python3 :lines: 183- Solution -------- When you are ready to see one possible solution, try :download:`this file `