diff --git a/Exercise-2.ipynb b/Exercise-2.ipynb index 43d9b40..97f0832 100644 --- a/Exercise-2.ipynb +++ b/Exercise-2.ipynb @@ -1,854 +1 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "ae516862ac73560446967070083b43dc", - "grade": false, - "grade_id": "cell-577a4204893ab1a5", - "locked": true, - "schema_version": 3, - "solution": false - } - }, - "source": [ - "# Exercise 2 - Lists and indices (10 points)\n", - "\n", - "The exercise for this week is meant to help you better understand lists in Python, and practice saving changes to your files using Git and GitHub. You will also get to practice the Markdown syntax. \n", - "\n", - "Exercise 2 consists of 3 problems. For each problem you need to modify the notebook by adding your own solutions. Remember to save and commit your changes locally, and push your changes to GitHub after each major change! Regular commits will help you to keep track of your changes (and revert them if needed). Pushing your work to GitHub will ensure that you don't lose any work in case your computer crashes (can happen!).\n", - "\n", - "**Please don't change the file name**, i.e. do all your editing in the provided `Exercise-2.ipynb` file. \n", - "\n", - "- **Exercise 2 is due by the start of the next lesson (9:15 am, 16 September 2020)**.\n", - "- **We are [working in pairs](https://geo-python-site.readthedocs.io/en/latest/lessons/L2/why-pairs.html) on this exercise**, and we will only grade the repository of the member of your pair that is responsible for this week's exercise.\n", - "\n", - "## Please note\n", - "\n", - "- The Python code cells where you should make changes will contain text that reads\n", - "\n", - " ```Python\n", - " # YOUR CODE HERE\n", - " raise NotImplementedError()\n", - " ```\n", - " **You should delete that text and replace it with your code** to answer the related question\n", - "- Some of the cells in this Jupyter Notebook are \"Read-only\" which means that you are not able to edit them.\n", - "- Some of the code cells contain tests. If these tests fail (you see an error message), you know there is still something wrong with your code.\n", - "\n", - "## Where to find help\n", - "\n", - "- Review the [materials for Lesson 2](https://geo-python-site.readthedocs.io/en/latest/lessons/L2/overview.html)\n", - "- Check out [the hints for this week's exercise](https://geo-python-site.readthedocs.io/en/latest/lessons/L2/exercise-2.html#exercise-2-hints) on the course webpage\n", - "\n", - "Students at the University of Helsinki are also encouraged to participate in the exercise sessions and discussion on Slack. " - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "570dee26bacb21b7bf960bb2f30625d0", - "grade": false, - "grade_id": "cell-51a3fbb6b8d35c74", - "locked": true, - "schema_version": 3, - "solution": false - } - }, - "source": [ - "## Problem 0 - Cloning Exercise repository to JupyterLab (*0 points*)\n", - "\n", - "Before starting to work with the actual problems for this week, you should start a new JupyterLab instance and clone **your own** Exercise 2 repository (e.g. `exercise-2-htenkanen`) into the instance using **Git**. *Check [the Lesson 2 materials](https://geo-python-site.readthedocs.io/en/latest/lessons/L2/git-basics.html) for instructions on how to get started.* " - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "a1b60ad9ffebc3a248209124070c2971", - "grade": false, - "grade_id": "cell-34d197ef67f874ec", - "locked": true, - "schema_version": 3, - "solution": false - } - }, - "source": [ - "## Problem 1 - Making and changing lists, and using Git (*3 points*)\n", - "\n", - "Your first task for this week is to create a list of [FMI observation stations](http://en.ilmatieteenlaitos.fi/observation-stations) and the years in which they began operating.\n", - "You will then add some additional stations and operation years to your lists, and finally sort the lists such that the newest station is first in the list of operation years.\n", - "You will find the list of stations and the years in which they began operating below.\n", - "\n", - "| FMI station name | First year of operation |\n", - "| ----------------------- | :---------------------: |\n", - "| lighthouse | 2003 |\n", - "| Harmaja | 1989 |\n", - "| Suomenlinna aaltopoiju | 2016 |\n", - "| Kumpula | 2005 |\n", - "| Kaisaniemi | 1844 |\n", - "\n", - "### Grading for Problem 1\n", - "\n", - "Your score for this problem will be based on\n", - "\n", - "- Creating two lists for the FMI station names and years in which they began operating\n", - "- Adding the additional stations and operation years to your lists\n", - "- Sorting the lists as directed\n", - "- Committing each change separately using Git, and pushing the changes to GitHub\n", - "- Listing the changes you needed to make to get the code working in plain English by modifying the existing text or adding a Markdown cell above each change" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "49a90300e17cc96465f2ffe5adca18cb", - "grade": false, - "grade_id": "cell-624ad911a29570ae", - "locked": true, - "schema_version": 3, - "solution": false - } - }, - "source": [ - "### Part 1 - Creating the lists (1 point)\n", - "\n", - "In the cell below you should create two lists:\n", - "\n", - "- `station_names` should contain the FMI station names in the order they are given above\n", - "- `station_start_years` should contain the first years of operation of the stations, again in the order give above" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "30b2defcd516fd1d0ee4fc1d2185b387", - "grade": false, - "grade_id": "problem_1_ag_p1_station_lists", - "locked": false, - "schema_version": 3, - "solution": true, - "task": false - } - }, - "outputs": [], - "source": [ - "# Create the lists below\n", - "station_names = None\n", - "station_start_years = None\n", - "# YOUR CODE HERE\n", - "raise NotImplementedError()" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "137ae18b47dd7d33f45036431920c009", - "grade": false, - "grade_id": "cell-a4f94f90a8ef693a", - "locked": true, - "schema_version": 3, - "solution": false, - "task": false - } - }, - "source": [ - "Let's now check the lists contain the expected values." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "66ba694479717036eaf391f2975da9d7", - "grade": true, - "grade_id": "problem_1_ag_p1_station_lists_test1", - "locked": true, - "points": 0.5, - "schema_version": 3, - "solution": false, - "task": false - } - }, - "outputs": [], - "source": [ - "# This is a test cell that checks that the list lengths are correct\n", - "# Running this cell should not produce any errors\n", - "assert len(station_names) == 5, 'The station_names list should have 5 items.'\n", - "assert len(station_start_years) == 5, 'The station_start_years list should have 5 items.'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "3e38bade7644bc60c3392d048f668d11", - "grade": true, - "grade_id": "problem_1_ag_p1_station_lists_test2", - "locked": true, - "points": 0.5, - "schema_version": 3, - "solution": false, - "task": false - } - }, - "outputs": [], - "source": [ - "# This is a test cell that checks that the first item in the lists is correct\n", - "# Running this cell should not produce any errors\n", - "assert station_names[0] == 'lighthouse', 'The first item in the station_names list should be \"lighthouse\"'\n", - "assert station_start_years[0] == 2003, 'The first item in the station_start_years list should be 2003'" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "4fbcc633bbf12cc049142a53e1c6e5fa", - "grade": false, - "grade_id": "cell-111a923765d7da38", - "locked": true, - "schema_version": 3, - "solution": false - } - }, - "source": [ - "### Part 2 - Modifying the lists (1 point)\n", - "\n", - "Let's now add a few more stations to our lists.\n", - "The stations to add are shown in the table below.\n", - "\n", - "| FMI station name | First year of operation |\n", - "| ---------------- | :---------------------: |\n", - "| Malmi airfield | 1937 |\n", - "| Vuosaari harbour | 2012 |\n", - "| Kaivopuisto | 1904 |\n", - "\n", - "In the cell below you should add the stations and starting years to your existing `station_names` and `station_start_years` lists in the order they are listed above." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "03134b0495305cdac9000d566beeabca", - "grade": false, - "grade_id": "problem_1_ag_p2_modify_lists", - "locked": false, - "schema_version": 3, - "solution": true - } - }, - "outputs": [], - "source": [ - "# Add the additional stations to the lists below\n", - "\n", - "# YOUR CODE HERE\n", - "raise NotImplementedError()" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "4a602161f3d1e9d78420fc50666dcb7d", - "grade": false, - "grade_id": "cell-25712dde56b0deb9", - "locked": true, - "schema_version": 3, - "solution": false, - "task": false - } - }, - "source": [ - "And we can now check to see whether the modified lists contain the expected values." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "2b48ea5a73266d2db26ddfaf63726f32", - "grade": true, - "grade_id": "problem_1_ag_p2_modify_lists_test1", - "locked": true, - "points": 0.5, - "schema_version": 3, - "solution": false - } - }, - "outputs": [], - "source": [ - "# This is a test cell that checks that the list lengths are correct\n", - "# Running this cell should not produce any errors\n", - "assert len(station_names) == 8, 'The station_names list should have 8 items.'\n", - "assert len(station_start_years) == 8, 'The station_start_years list should have 8 items.'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "139a20a651acd1843e4c1c8a0a24c6e3", - "grade": true, - "grade_id": "problem_1_ag_p2_modify_lists_test2", - "locked": true, - "points": 0.5, - "schema_version": 3, - "solution": false, - "task": false - } - }, - "outputs": [], - "source": [ - "# This is a test cell that checks that the last item in the lists is correct\n", - "# Running this cell should not produce any errors\n", - "assert station_names[-1] == 'Kaivopuisto', 'The last item in the station_names list should be \"Kaivopuisto\"'\n", - "assert station_start_years[-1] == 1904, 'The last item in the station_start_years list should be 1904'" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "22b408e2113fb15a673c1d449e99429f", - "grade": false, - "grade_id": "cell-8c0ab6cf80173158", - "locked": true, - "schema_version": 3, - "solution": false - } - }, - "source": [ - "### Part 3 - Sorting the lists (1 point)\n", - "\n", - "Finally, we can take our lists and sort them. The goal here is to produce two sorted lists:\n", - "\n", - "- The `station_names` list should be sorted so the stations are in alphabetical order\n", - "- The `station_start_years` list should be sorted so that the most recent station starting year is first in the list" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "0fba7260fc0cbc34d8a8de73132feeee", - "grade": false, - "grade_id": "problem_1_ag_p3_station_years", - "locked": false, - "schema_version": 3, - "solution": true - } - }, - "outputs": [], - "source": [ - "# Sort the lists as directed below\n", - "\n", - "# YOUR CODE HERE\n", - "raise NotImplementedError()" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "997d3e99379c4f19b51db2f64dcd8461", - "grade": false, - "grade_id": "cell-a3782621daec92f2", - "locked": true, - "schema_version": 3, - "solution": false - } - }, - "source": [ - "Let's now check that the first value in each sorted list is correct." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "1d2643d42e74590b3b7f5009af19c86a", - "grade": true, - "grade_id": "problem_1_ag_p3_station_years_test1", - "locked": true, - "points": 1, - "schema_version": 3, - "solution": false, - "task": false - } - }, - "outputs": [], - "source": [ - "# This is a test cell that checks that the last item in the lists is correct\n", - "# Running this cell should not produce any errors\n", - "assert station_names[0] == 'Harmaja', 'The first item in the station_names list should be \"Harmaja\"'\n", - "assert station_start_years[0] == 2016, 'The first item in the station_start_years list should be 2016'" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "5250b41453218310e2284d6da716e2e8", - "grade": false, - "grade_id": "final_answer_question", - "locked": true, - "schema_version": 3, - "solution": false - } - }, - "source": [ - "### Part 4 - Understanding the code (0 points)\n", - "\n", - "Looking at the lists used in Problem 1, what might be a problem with how we have sorted them?\n", - "Please answer briefly in the cell below." - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "c947bd864796e1c454306db805bfec51", - "grade": true, - "grade_id": "problem_1_mg_p4_final_answer_question_test", - "locked": false, - "points": 0, - "schema_version": 3, - "solution": true - } - }, - "source": [ - "YOUR ANSWER HERE" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "d3ceafcfeb212e18fbbc5fac8079cfae", - "grade": false, - "grade_id": "problem_1_mg_p5_zip", - "locked": true, - "schema_version": 3, - "solution": false, - "task": false - } - }, - "source": [ - "### Part 5 - Python + Google (optional, 0 points)\n", - "\n", - "Python has a function called `zip()` that might be helpful in solving the issue mentioned in Part 4.\n", - "If you like, you're free to do some Googling and see whether you can figure out how to use the `zip()` function to ensure that the station data is consistent for both lists when sorting the station starting years in reverse order.\n", - "This is a completely optional task.\n", - "\n", - "**NOTE**: If you plan to skip this optional problem, be sure to delete the `raise NotImplementedError()` line in the cell below so that you don't have any errors when we run your notebook!" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "5baa8f50e1d4dd0f801af1f4d13aa9fc", - "grade": true, - "grade_id": "problem_1_mg_p5_zip_test", - "locked": false, - "points": 0, - "schema_version": 3, - "solution": true, - "task": false - } - }, - "outputs": [], - "source": [ - "# YOUR CODE HERE\n", - "raise NotImplementedError()" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "885db59f97f40d3c7bd15f1ce333ac90", - "grade": false, - "grade_id": "cell-f328c6e177c1d29c", - "locked": true, - "schema_version": 3, - "solution": false - } - }, - "source": [ - "## Problem 2 - Accessing monthly average temperatures (*5 points*)\n", - "\n", - "The table below presents [monthly average temperatures recorded at the Helsinki Malmi airport](https://www.timeanddate.com/weather/finland/helsinki/climate).\n", - "\n", - "| Month | Temperature [°C] |\n", - "| --------- | :--------------: |\n", - "| January | -3.5 |\n", - "| February | -4.5 |\n", - "| March | -1.0 |\n", - "| April | 4.0 |\n", - "| May | 10.0 |\n", - "| June | 15.0 |\n", - "| July | 18.0 |\n", - "| August | 16.0 |\n", - "| September | 11.5 |\n", - "| October | 6.0 |\n", - "| November | 2.0 |\n", - "| December | -1.5 |\n", - "\n", - "In the code cells below, write some Python code that allows users to select a month and have the monthly average temperature printed to the screen.\n", - "For example, your code should display the following for the month of March:\n", - "\n", - "```\n", - "The average temperature in Helsinki in March is -1.0\n", - "```\n", - "\n", - "### Grading for Problem 2\n", - "\n", - "Your score for this problem will be based on\n", - "\n", - "- Having your notebook display the monthly average temperature in a selected month, set by defining the variable `selected_month_index`. **NOTE**: We expect you to use the index value to select the month, not the name of the month (e.g., \"May\").\n", - "- Having it work for all 12 months in the year.\n", - "- Describe how your code works in a few sentences of plain English in the Markdown cell above your code\n", - "- Including inline comments to clearly explain how the code works between most and/or all lines of your code in its Python cell\n", - "- Pushing your script to your GitHub repository." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "07ae2b7286abb4ecc95e2ea4435aeadc", - "grade": false, - "grade_id": "problem_2_ag_p1_define_lists", - "locked": false, - "schema_version": 3, - "solution": true - } - }, - "outputs": [], - "source": [ - "# here is the variable which you use to set the selected month:\n", - "selected_month_index = None\n", - "\n", - "# Here are also the names of the two lists you should use for this problem. Please don't change the variable names!\n", - "months = None\n", - "average_temp = None\n", - "\n", - "# Using the lists and their indices, generate the desired print statement:\n", - "print_statement = None\n", - "\n", - "# YOUR CODE HERE\n", - "raise NotImplementedError()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "3591983d4a06a45f88b27e5aaa6aa476", - "grade": true, - "grade_id": "problem_2_ag_p1_define_lists_test1", - "locked": true, - "points": 1, - "schema_version": 3, - "solution": false - } - }, - "outputs": [], - "source": [ - "# Check your print statement:\n", - "print(print_statement)" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "24fa5252c80ec61224dc0b3bd268eedb", - "grade": false, - "grade_id": "cell-3fb0ac91413aeadc", - "locked": true, - "schema_version": 3, - "solution": false, - "task": false - } - }, - "source": [ - "### Additional tests for problem 2\n", - "\n", - "Let's run some additional tests to see if things are working as they should! These tests may help you in solving the problem. Note, we also run some hidden tests for checking the exercises." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "9b8c942b5771463e1c11786e41741a0c", - "grade": true, - "grade_id": "problem_2_ag_p1_define_lists_test2", - "locked": true, - "points": 1, - "schema_version": 3, - "solution": false - } - }, - "outputs": [], - "source": [ - "#Validate the length of two lists are 12\n", - "assert len(months) == 12, 'Wrong length!'\n", - "assert len(average_temp) == 12, 'Wrong length!'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "21016dc6b1836783453540ee7a88f270", - "grade": true, - "grade_id": "problem_2_ag_p1_define_lists_test3", - "locked": true, - "points": 1, - "schema_version": 3, - "solution": false - } - }, - "outputs": [], - "source": [ - "#Validate that variable months and average_temp are lists\n", - "assert isinstance(months, list), 'Variable months is not a list'\n", - "assert isinstance(average_temp, list), 'Variable average_temp is not a list'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "code", - "checksum": "fbed36bfdfdb1f5f0d80c2e5755ab563", - "grade": true, - "grade_id": "problem_2_ag_p1_define_lists_test4", - "locked": true, - "points": 2, - "schema_version": 3, - "solution": false - } - }, - "outputs": [], - "source": [ - "#Validate the print statement is correct; \n", - "# Set selected_month_index to correspond with July before running this cell.\n", - "# Note! Your code should work with any of the 12 months!\n", - "assert print_statement == 'The average temperature in Helsinki in July is 18.0'" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "editable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "df2a81a450b332bdf1cfff0c222d347b", - "grade": false, - "grade_id": "markdown_practice", - "locked": true, - "schema_version": 3, - "solution": false - } - }, - "source": [ - "## Problem 3 - More practice using Markdown (*2 points*)\n", - "\n", - "The last task in this week's exercise is to answer some questions and add an image in this notebook using Markdown. **Note**: You may want to read a bit more about [formatting text in Github-flavored Markdown](https://help.github.com/articles/basic-writing-and-formatting-syntax/).\n", - "\n", - "\n", - "### Grading for Problem 3\n", - "\n", - "Your score for this problem will be based on\n", - "\n", - "- Having answered the three questions below\n", - "- Posting an image of a favorite animal using Markdown\n", - "\n", - "\n", - "#### 1. Give your responses to these three questions about this week's lesson:\n", - "\n", - " - What did you learn?\n", - " - What was unclear?\n", - " - What would you change?\n", - " \n", - "*Please use Markdown lists when answering these questions.*\n", - " " - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "07de9dee5b2705f62be6f4908840a277", - "grade": true, - "grade_id": "problem_3_mg_p1_questions", - "locked": false, - "points": 1, - "schema_version": 3, - "solution": true - } - }, - "source": [ - "YOUR ANSWER HERE" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### 2. Adding an image\n", - "\n", - "Just for fun, add an image of an animal that you like along with a short caption giving its name and anything special you might like to add.\n", - "\n", - "You can add an image using an URL, or (if you are looking for a challenge) by uploading an image to your GitHub repository and linking that image file to this notebook .\n", - "\n", - "We suggest that you search for images in a repository that includes licencing information such as [Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page) or [Pixabay](https://pixabay.com/). You are, of course, also welcome to upload your own animal images. " - ] - }, - { - "cell_type": "markdown", - "metadata": { - "deletable": false, - "nbgrader": { - "cell_type": "markdown", - "checksum": "1db2dc7f7a933da2050ba0fc4ac2ce2f", - "grade": true, - "grade_id": "problem_3_mg_p1_insert_image", - "locked": false, - "points": 1, - "schema_version": 3, - "solution": true - } - }, - "source": [ - "YOUR ANSWER HERE" - ] - } - ], - "metadata": { - "anaconda-cloud": {}, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} +{"metadata":{"anaconda-cloud":{},"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.7.8","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Exercise 2 - Lists and indices (10 points)\n\nThe exercise for this week is meant to help you better understand lists in Python, and practice saving changes to your files using Git and GitHub. You will also get to practice the Markdown syntax. \n\nExercise 2 consists of 3 problems. For each problem you need to modify the notebook by adding your own solutions. Remember to save and commit your changes locally, and push your changes to GitHub after each major change! Regular commits will help you to keep track of your changes (and revert them if needed). Pushing your work to GitHub will ensure that you don't lose any work in case your computer crashes (can happen!).\n\n**Please don't change the file name**, i.e. do all your editing in the provided `Exercise-2.ipynb` file. \n\n- **Exercise 2 is due by the start of the next lesson (9:15 am, 16 September 2020)**.\n- **We are [working in pairs](https://geo-python-site.readthedocs.io/en/latest/lessons/L2/why-pairs.html) on this exercise**, and we will only grade the repository of the member of your pair that is responsible for this week's exercise.\n\n## Please note\n\n- The Python code cells where you should make changes will contain text that reads\n\n ```Python\n # YOUR CODE HERE\n raise NotImplementedError()\n ```\n **You should delete that text and replace it with your code** to answer the related question\n- Some of the cells in this Jupyter Notebook are \"Read-only\" which means that you are not able to edit them.\n- Some of the code cells contain tests. If these tests fail (you see an error message), you know there is still something wrong with your code.\n\n## Where to find help\n\n- Review the [materials for Lesson 2](https://geo-python-site.readthedocs.io/en/latest/lessons/L2/overview.html)\n- Check out [the hints for this week's exercise](https://geo-python-site.readthedocs.io/en/latest/lessons/L2/exercise-2.html#exercise-2-hints) on the course webpage\n\nStudents at the University of Helsinki are also encouraged to participate in the exercise sessions and discussion on Slack. ","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"ae516862ac73560446967070083b43dc","grade":false,"grade_id":"cell-577a4204893ab1a5","locked":true,"schema_version":3,"solution":false}}},{"cell_type":"markdown","source":"## Problem 0 - Cloning Exercise repository to JupyterLab (*0 points*)\n\nBefore starting to work with the actual problems for this week, you should start a new JupyterLab instance and clone **your own** Exercise 2 repository (e.g. `exercise-2-htenkanen`) into the instance using **Git**. *Check [the Lesson 2 materials](https://geo-python-site.readthedocs.io/en/latest/lessons/L2/git-basics.html) for instructions on how to get started.* ","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"570dee26bacb21b7bf960bb2f30625d0","grade":false,"grade_id":"cell-51a3fbb6b8d35c74","locked":true,"schema_version":3,"solution":false}}},{"cell_type":"markdown","source":"## Problem 1 - Making and changing lists, and using Git (*3 points*)\n\nYour first task for this week is to create a list of [FMI observation stations](http://en.ilmatieteenlaitos.fi/observation-stations) and the years in which they began operating.\nYou will then add some additional stations and operation years to your lists, and finally sort the lists such that the newest station is first in the list of operation years.\nYou will find the list of stations and the years in which they began operating below.\n\n| FMI station name | First year of operation |\n| ----------------------- | :---------------------: |\n| lighthouse | 2003 |\n| Harmaja | 1989 |\n| Suomenlinna aaltopoiju | 2016 |\n| Kumpula | 2005 |\n| Kaisaniemi | 1844 |\n\n### Grading for Problem 1\n\nYour score for this problem will be based on\n\n- Creating two lists for the FMI station names and years in which they began operating\n- Adding the additional stations and operation years to your lists\n- Sorting the lists as directed\n- Committing each change separately using Git, and pushing the changes to GitHub\n- Listing the changes you needed to make to get the code working in plain English by modifying the existing text or adding a Markdown cell above each change","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"a1b60ad9ffebc3a248209124070c2971","grade":false,"grade_id":"cell-34d197ef67f874ec","locked":true,"schema_version":3,"solution":false}}},{"cell_type":"markdown","source":"### Part 1 - Creating the lists (1 point)\n\nIn the cell below you should create two lists:\n\n- `station_names` should contain the FMI station names in the order they are given above\n- `station_start_years` should contain the first years of operation of the stations, again in the order give above","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"49a90300e17cc96465f2ffe5adca18cb","grade":false,"grade_id":"cell-624ad911a29570ae","locked":true,"schema_version":3,"solution":false}}},{"cell_type":"code","source":"# Create the lists below\nstation_names = ['lighthouse', 'Harmaja', 'Suomenlinna aaltopoiju', 'Kumpula', 'Kaisaniemi' ]\nstation_start_years = [2003, 1989, 2016, 2005, 1844]\n# YOUR CODE HERE\nprint(station_names)\nprint(station_start_years)","metadata":{"deletable":false,"nbgrader":{"cell_type":"code","checksum":"30b2defcd516fd1d0ee4fc1d2185b387","grade":false,"grade_id":"problem_1_ag_p1_station_lists","locked":false,"schema_version":3,"solution":true,"task":false},"trusted":true},"execution_count":7,"outputs":[{"name":"stdout","text":"['lighthouse', 'Harmaja', 'Suomenlinna aaltopoiju', 'Kumpula', 'Kaisaniemi']\n[2003, 1989, 2016, 2005, 1844]\n","output_type":"stream"}]},{"cell_type":"markdown","source":"Let's now check the lists contain the expected values.","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"137ae18b47dd7d33f45036431920c009","grade":false,"grade_id":"cell-a4f94f90a8ef693a","locked":true,"schema_version":3,"solution":false,"task":false}}},{"cell_type":"code","source":"# This is a test cell that checks that the list lengths are correct\n# Running this cell should not produce any errors\nassert len(station_names) == 5, 'The station_names list should have 5 items.'\nassert len(station_start_years) == 5, 'The station_start_years list should have 5 items.'","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"code","checksum":"66ba694479717036eaf391f2975da9d7","grade":true,"grade_id":"problem_1_ag_p1_station_lists_test1","locked":true,"points":0.5,"schema_version":3,"solution":false,"task":false},"trusted":true},"execution_count":8,"outputs":[]},{"cell_type":"code","source":"# This is a test cell that checks that the first item in the lists is correct\n# Running this cell should not produce any errors\nassert station_names[0] == 'lighthouse', 'The first item in the station_names list should be \"lighthouse\"'\nassert station_start_years[0] == 2003, 'The first item in the station_start_years list should be 2003'","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"code","checksum":"3e38bade7644bc60c3392d048f668d11","grade":true,"grade_id":"problem_1_ag_p1_station_lists_test2","locked":true,"points":0.5,"schema_version":3,"solution":false,"task":false},"trusted":true},"execution_count":9,"outputs":[]},{"cell_type":"markdown","source":"### Part 2 - Modifying the lists (1 point)\n\nLet's now add a few more stations to our lists.\nThe stations to add are shown in the table below.\n\n| FMI station name | First year of operation |\n| ---------------- | :---------------------: |\n| Malmi airfield | 1937 |\n| Vuosaari harbour | 2012 |\n| Kaivopuisto | 1904 |\n\nIn the cell below you should add the stations and starting years to your existing `station_names` and `station_start_years` lists in the order they are listed above.","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"4fbcc633bbf12cc049142a53e1c6e5fa","grade":false,"grade_id":"cell-111a923765d7da38","locked":true,"schema_version":3,"solution":false}}},{"cell_type":"code","source":"# Add the additional stations to the lists below\n\n# YOUR CODE HERE\nstation_names = station_names + ['Malmi airfield', 'Vuosaari harbour', 'Kaivopuisto']\nstation_start_years = station_start_years + [1937, 2012, 1904]","metadata":{"deletable":false,"nbgrader":{"cell_type":"code","checksum":"03134b0495305cdac9000d566beeabca","grade":false,"grade_id":"problem_1_ag_p2_modify_lists","locked":false,"schema_version":3,"solution":true},"trusted":true},"execution_count":14,"outputs":[]},{"cell_type":"markdown","source":"And we can now check to see whether the modified lists contain the expected values.","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"4a602161f3d1e9d78420fc50666dcb7d","grade":false,"grade_id":"cell-25712dde56b0deb9","locked":true,"schema_version":3,"solution":false,"task":false}}},{"cell_type":"code","source":"# This is a test cell that checks that the list lengths are correct\n# Running this cell should not produce any errors\nassert len(station_names) == 8, 'The station_names list should have 8 items.'\nassert len(station_start_years) == 8, 'The station_start_years list should have 8 items.'","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"code","checksum":"2b48ea5a73266d2db26ddfaf63726f32","grade":true,"grade_id":"problem_1_ag_p2_modify_lists_test1","locked":true,"points":0.5,"schema_version":3,"solution":false},"trusted":true},"execution_count":15,"outputs":[]},{"cell_type":"code","source":"# This is a test cell that checks that the last item in the lists is correct\n# Running this cell should not produce any errors\nassert station_names[-1] == 'Kaivopuisto', 'The last item in the station_names list should be \"Kaivopuisto\"'\nassert station_start_years[-1] == 1904, 'The last item in the station_start_years list should be 1904'","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"code","checksum":"139a20a651acd1843e4c1c8a0a24c6e3","grade":true,"grade_id":"problem_1_ag_p2_modify_lists_test2","locked":true,"points":0.5,"schema_version":3,"solution":false,"task":false},"trusted":true},"execution_count":16,"outputs":[]},{"cell_type":"markdown","source":"### Part 3 - Sorting the lists (1 point)\n\nFinally, we can take our lists and sort them. The goal here is to produce two sorted lists:\n\n- The `station_names` list should be sorted so the stations are in alphabetical order\n- The `station_start_years` list should be sorted so that the most recent station starting year is first in the list","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"22b408e2113fb15a673c1d449e99429f","grade":false,"grade_id":"cell-8c0ab6cf80173158","locked":true,"schema_version":3,"solution":false}}},{"cell_type":"code","source":"# Sort the lists as directed below\n\nstation_names.sort()\nstation_start_years.sort(reverse = True)\n","metadata":{"deletable":false,"nbgrader":{"cell_type":"code","checksum":"0fba7260fc0cbc34d8a8de73132feeee","grade":false,"grade_id":"problem_1_ag_p3_station_years","locked":false,"schema_version":3,"solution":true},"trusted":true},"execution_count":21,"outputs":[]},{"cell_type":"markdown","source":"Let's now check that the first value in each sorted list is correct.","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"997d3e99379c4f19b51db2f64dcd8461","grade":false,"grade_id":"cell-a3782621daec92f2","locked":true,"schema_version":3,"solution":false}}},{"cell_type":"code","source":"# This is a test cell that checks that the last item in the lists is correct\n# Running this cell should not produce any errors\nassert station_names[0] == 'Harmaja', 'The first item in the station_names list should be \"Harmaja\"'\nassert station_start_years[0] == 2016, 'The first item in the station_start_years list should be 2016'","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"code","checksum":"1d2643d42e74590b3b7f5009af19c86a","grade":true,"grade_id":"problem_1_ag_p3_station_years_test1","locked":true,"points":1,"schema_version":3,"solution":false,"task":false},"trusted":true},"execution_count":22,"outputs":[]},{"cell_type":"markdown","source":"### Part 4 - Understanding the code (0 points)\n\nLooking at the lists used in Problem 1, what might be a problem with how we have sorted them?\nPlease answer briefly in the cell below.","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"5250b41453218310e2284d6da716e2e8","grade":false,"grade_id":"final_answer_question","locked":true,"schema_version":3,"solution":false}}},{"cell_type":"markdown","source":"They are no longer lined up to match since we sorted one alphabetically and the other by year.","metadata":{"deletable":false,"nbgrader":{"cell_type":"markdown","checksum":"c947bd864796e1c454306db805bfec51","grade":true,"grade_id":"problem_1_mg_p4_final_answer_question_test","locked":false,"points":0,"schema_version":3,"solution":true}}},{"cell_type":"markdown","source":"### Part 5 - Python + Google (optional, 0 points)\n\nPython has a function called `zip()` that might be helpful in solving the issue mentioned in Part 4.\nIf you like, you're free to do some Googling and see whether you can figure out how to use the `zip()` function to ensure that the station data is consistent for both lists when sorting the station starting years in reverse order.\nThis is a completely optional task.\n\n**NOTE**: If you plan to skip this optional problem, be sure to delete the `raise NotImplementedError()` line in the cell below so that you don't have any errors when we run your notebook!","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"d3ceafcfeb212e18fbbc5fac8079cfae","grade":false,"grade_id":"problem_1_mg_p5_zip","locked":true,"schema_version":3,"solution":false,"task":false}}},{"cell_type":"code","source":"# YOUR CODE HERE\ncombined = zip(station_names, station_start_years)\ncombined_set = set(combined)\nprint(combined_set)","metadata":{"deletable":false,"nbgrader":{"cell_type":"code","checksum":"5baa8f50e1d4dd0f801af1f4d13aa9fc","grade":true,"grade_id":"problem_1_mg_p5_zip_test","locked":false,"points":0,"schema_version":3,"solution":true,"task":false},"trusted":true},"execution_count":28,"outputs":[{"name":"stdout","text":"{('Kumpula', 2003), ('Malmi airfield', 1989), ('Kaivopuisto', 2005), ('Kaisaniemi', 2012), ('lighthouse', 1844), ('Vuosaari harbour', 1904), ('Suomenlinna aaltopoiju', 1937), ('Harmaja', 2016)}\n","output_type":"stream"}]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":27,"outputs":[{"traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)","\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mcombined\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m","\u001b[0;31mAttributeError\u001b[0m: 'zip' object has no attribute 'head'"],"ename":"AttributeError","evalue":"'zip' object has no attribute 'head'","output_type":"error"}]},{"cell_type":"markdown","source":"## Problem 2 - Accessing monthly average temperatures (*5 points*)\n\nThe table below presents [monthly average temperatures recorded at the Helsinki Malmi airport](https://www.timeanddate.com/weather/finland/helsinki/climate).\n\n| Month | Temperature [°C] |\n| --------- | :--------------: |\n| January | -3.5 |\n| February | -4.5 |\n| March | -1.0 |\n| April | 4.0 |\n| May | 10.0 |\n| June | 15.0 |\n| July | 18.0 |\n| August | 16.0 |\n| September | 11.5 |\n| October | 6.0 |\n| November | 2.0 |\n| December | -1.5 |\n\nIn the code cells below, write some Python code that allows users to select a month and have the monthly average temperature printed to the screen.\nFor example, your code should display the following for the month of March:\n\n```\nThe average temperature in Helsinki in March is -1.0\n```\n\n### Grading for Problem 2\n\nYour score for this problem will be based on\n\n- Having your notebook display the monthly average temperature in a selected month, set by defining the variable `selected_month_index`. **NOTE**: We expect you to use the index value to select the month, not the name of the month (e.g., \"May\").\n- Having it work for all 12 months in the year.\n- Describe how your code works in a few sentences of plain English in the Markdown cell above your code\n- Including inline comments to clearly explain how the code works between most and/or all lines of your code in its Python cell\n- Pushing your script to your GitHub repository.","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"885db59f97f40d3c7bd15f1ce333ac90","grade":false,"grade_id":"cell-f328c6e177c1d29c","locked":true,"schema_version":3,"solution":false}}},{"cell_type":"code","source":"# here is the variable which you use to set the selected month:\nselected_month_index = 6\n\n# Here are also the names of the two lists you should use for this problem. Please don't change the variable names!\nmonths = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'July', 'Aug', 'September', 'October', 'November', 'December']\naverage_temp = [-3.5, -4.5, -1.0, 4.0, 10.0, 15.0, 18.0, 16.0 ,11.5, 6.0,2.0,-1.5]\n\n# Using the lists and their indices, generate the desired print statement:\nprint_statement = 'The average temperature in Helsinki in ' + str(months[selected_month_index]) + ' is ' + str(average_temp[selected_month_index])\n\n# YOUR CODE HERE","metadata":{"deletable":false,"nbgrader":{"cell_type":"code","checksum":"07ae2b7286abb4ecc95e2ea4435aeadc","grade":false,"grade_id":"problem_2_ag_p1_define_lists","locked":false,"schema_version":3,"solution":true},"trusted":true},"execution_count":56,"outputs":[]},{"cell_type":"code","source":"# Check your print statement:\nprint(print_statement)","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"code","checksum":"3591983d4a06a45f88b27e5aaa6aa476","grade":true,"grade_id":"problem_2_ag_p1_define_lists_test1","locked":true,"points":1,"schema_version":3,"solution":false},"trusted":true},"execution_count":57,"outputs":[{"name":"stdout","text":"The average temperature in Helsinki in July is 18.0\n","output_type":"stream"}]},{"cell_type":"markdown","source":"### Additional tests for problem 2\n\nLet's run some additional tests to see if things are working as they should! These tests may help you in solving the problem. Note, we also run some hidden tests for checking the exercises.","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"24fa5252c80ec61224dc0b3bd268eedb","grade":false,"grade_id":"cell-3fb0ac91413aeadc","locked":true,"schema_version":3,"solution":false,"task":false}}},{"cell_type":"code","source":"#Validate the length of two lists are 12\nassert len(months) == 12, 'Wrong length!'\nassert len(average_temp) == 12, 'Wrong length!'","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"code","checksum":"9b8c942b5771463e1c11786e41741a0c","grade":true,"grade_id":"problem_2_ag_p1_define_lists_test2","locked":true,"points":1,"schema_version":3,"solution":false},"trusted":true},"execution_count":50,"outputs":[]},{"cell_type":"code","source":"#Validate that variable months and average_temp are lists\nassert isinstance(months, list), 'Variable months is not a list'\nassert isinstance(average_temp, list), 'Variable average_temp is not a list'","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"code","checksum":"21016dc6b1836783453540ee7a88f270","grade":true,"grade_id":"problem_2_ag_p1_define_lists_test3","locked":true,"points":1,"schema_version":3,"solution":false},"trusted":true},"execution_count":51,"outputs":[]},{"cell_type":"code","source":"#Validate the print statement is correct; \n# Set selected_month_index to correspond with July before running this cell.\n# Note! Your code should work with any of the 12 months!\nassert print_statement == 'The average temperature in Helsinki in July is 18.0'","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"code","checksum":"fbed36bfdfdb1f5f0d80c2e5755ab563","grade":true,"grade_id":"problem_2_ag_p1_define_lists_test4","locked":true,"points":2,"schema_version":3,"solution":false},"trusted":true},"execution_count":54,"outputs":[{"traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mAssertionError\u001b[0m Traceback (most recent call last)","\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;31m# Set selected_month_index to correspond with July before running this cell.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;31m# Note! Your code should work with any of the 12 months!\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32massert\u001b[0m \u001b[0mprint_statement\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'The average temperature in Helsinki in July is 18.0'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m","\u001b[0;31mAssertionError\u001b[0m: "],"ename":"AssertionError","evalue":"","output_type":"error"}]},{"cell_type":"markdown","source":"## Problem 3 - More practice using Markdown (*2 points*)\n\nThe last task in this week's exercise is to answer some questions and add an image in this notebook using Markdown. **Note**: You may want to read a bit more about [formatting text in Github-flavored Markdown](https://help.github.com/articles/basic-writing-and-formatting-syntax/).\n\n\n### Grading for Problem 3\n\nYour score for this problem will be based on\n\n- Having answered the three questions below\n- Posting an image of a favorite animal using Markdown\n\n\n#### 1. Give your responses to these three questions about this week's lesson:\n\n - What did you learn?\n - What was unclear?\n - What would you change?\n \n*Please use Markdown lists when answering these questions.*\n ","metadata":{"deletable":false,"editable":false,"nbgrader":{"cell_type":"markdown","checksum":"df2a81a450b332bdf1cfff0c222d347b","grade":false,"grade_id":"markdown_practice","locked":true,"schema_version":3,"solution":false}}},{"cell_type":"markdown","source":"YOUR ANSWER HERE","metadata":{"deletable":false,"nbgrader":{"cell_type":"markdown","checksum":"07de9dee5b2705f62be6f4908840a277","grade":true,"grade_id":"problem_3_mg_p1_questions","locked":false,"points":1,"schema_version":3,"solution":true}}},{"cell_type":"markdown","source":"#### 2. Adding an image\n\nJust for fun, add an image of an animal that you like along with a short caption giving its name and anything special you might like to add.\n\nYou can add an image using an URL, or (if you are looking for a challenge) by uploading an image to your GitHub repository and linking that image file to this notebook .\n\nWe suggest that you search for images in a repository that includes licencing information such as [Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page) or [Pixabay](https://pixabay.com/). You are, of course, also welcome to upload your own animal images. ","metadata":{}},{"cell_type":"markdown","source":"![Image of Yaktocat](https://octodex.github.com/images/yaktocat.png)","metadata":{"deletable":false,"nbgrader":{"cell_type":"markdown","checksum":"1db2dc7f7a933da2050ba0fc4ac2ce2f","grade":true,"grade_id":"problem_3_mg_p1_insert_image","locked":false,"points":1,"schema_version":3,"solution":true}}}]} \ No newline at end of file