From 6bbf74a2365b887b43ca97a93510e485e2321155 Mon Sep 17 00:00:00 2001 From: msyamkumar <msyamkumar@wisc.edu> Date: Fri, 14 Oct 2022 07:50:18 -0500 Subject: [PATCH] Adding a lat/long question --- .../lec-16/lec_16_list_practice.ipynb | 43 +++++++++++++++++++ .../lec_16_list_practice_template.ipynb | 43 +++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/f22/meena_lec_notes/lec-16/lec_16_list_practice.ipynb b/f22/meena_lec_notes/lec-16/lec_16_list_practice.ipynb index 4546693..fa9aa93 100644 --- a/f22/meena_lec_notes/lec-16/lec_16_list_practice.ipynb +++ b/f22/meena_lec_notes/lec-16/lec_16_list_practice.ipynb @@ -1178,6 +1178,49 @@ "## Self-practice" ] }, + { + "cell_type": "markdown", + "id": "fd43b7b3", + "metadata": {}, + "source": [ + "### Function: `find_fav_locations_within(lat_min, lat_max, long_min, long_max)` " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "a403a92c", + "metadata": {}, + "outputs": [], + "source": [ + "def find_fav_locations_within(lat_min, lat_max, long_min, long_max):\n", + " \"\"\"\n", + " find_prices_within(lat_min, lat_max, long_min, long_max) returns a nested list.\n", + " First inner list contains latitudes of favourite places within the geographical \n", + " location between and including\n", + " the latitudes lat_min and lat_max and longitudes long_min and long_max.\n", + " Second inner list contains longitudes of favourite places within the geographical \n", + " location between and including\n", + " the latitudes lat_min and lat_max and longitudes long_min and long_max.\n", + " \"\"\"\n", + " pass" + ] + }, + { + "cell_type": "markdown", + "id": "f2699919", + "metadata": {}, + "source": [ + "### What are the favourite places within United States?\n", + "\n", + "```\n", + "top = 49.3457868 # north lat\n", + "bottom = 24.7433195 # south lat\n", + "left = -124.7844079 # west long\n", + "right = -66.9513812 # east long\n", + "```" + ] + }, { "cell_type": "markdown", "id": "8ac26620", diff --git a/f22/meena_lec_notes/lec-16/lec_16_list_practice_template.ipynb b/f22/meena_lec_notes/lec-16/lec_16_list_practice_template.ipynb index a0247e3..7f958a7 100644 --- a/f22/meena_lec_notes/lec-16/lec_16_list_practice_template.ipynb +++ b/f22/meena_lec_notes/lec-16/lec_16_list_practice_template.ipynb @@ -648,6 +648,49 @@ "## Self-practice" ] }, + { + "cell_type": "markdown", + "id": "fe5b9303", + "metadata": {}, + "source": [ + "### Function: `find_fav_locations_within(lat_min, lat_max, long_min, long_max)` " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f8443ad2", + "metadata": {}, + "outputs": [], + "source": [ + "def find_fav_locations_within(lat_min, lat_max, long_min, long_max):\n", + " \"\"\"\n", + " find_prices_within(lat_min, lat_max, long_min, long_max) returns a nested list.\n", + " First inner list contains latitudes of favourite places within the geographical \n", + " location between and including\n", + " the latitudes lat_min and lat_max and longitudes long_min and long_max.\n", + " Second inner list contains longitudes of favourite places within the geographical \n", + " location between and including\n", + " the latitudes lat_min and lat_max and longitudes long_min and long_max.\n", + " \"\"\"\n", + " pass" + ] + }, + { + "cell_type": "markdown", + "id": "4e0d63eb", + "metadata": {}, + "source": [ + "### What are the favourite places within United States?\n", + "\n", + "```\n", + "top = 49.3457868 # north lat\n", + "bottom = 24.7433195 # south lat\n", + "left = -124.7844079 # west long\n", + "right = -66.9513812 # east long\n", + "```" + ] + }, { "cell_type": "markdown", "id": "8ac26620", -- GitLab