diff --git a/code/python_foundation/assignment b/code/python_foundation/assignment new file mode 100644 index 00000000..ec8b495c --- /dev/null +++ b/code/python_foundation/assignment @@ -0,0 +1,60 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "authorship_tag": "ABX9TyNlT/Gt+1vUAQv2YvOvlDbj" + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "markdown", + "source": [ + "# Assignment\n", + "\n", + "Your assignment is to geocode the addresses given below using [GeoPy](https://geopy.readthedocs.io/en/stable/). This assignment is designed to help you practice your coding skills learnt in the course so far." + ], + "metadata": { + "id": "ErX4L9CVntt2" + } + }, + { + "cell_type": "markdown", + "source": [ + "## Part 1\n", + "\n", + "You have been given a list containing 5 tuples of place names along with their address. You need to use the [Nominatim](https://geopy.readthedocs.io/en/stable/#module-geopy.geocoders) geocoder and obtain the latitude and longitude of each address." + ], + "metadata": { + "id": "RmZLGvLaoGgL" + } + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "id": "WGNIodilnc9I" + }, + "outputs": [], + "source": [ + "# List of Hurricane Evacuation Centers in New York City with Addresses\n", + "# Each item is a tuple with the name of the center and its address\n", + "locations = [\n", + " ('Norman Thomas HS (ECF)', '111 E 33rd St, New York, NY'),\n", + " ('Midtown East Campus', '233 E 56 Street, New York'),\n", + " ('Louis D. Brandeis HS', '145 W 84 Street, New York'),\n", + " ('Martin Luther King, Jr. HS', '122 Amsterdam Avenue, New York'),\n", + " ('P.S. 48', '4360-78 Broadway, New York')\n", + "]" + ] + } + ] +} \ No newline at end of file