]> projects.mako.cc - babynames-cdsw/commitdiff
Fixing some typos; clarifying final exercise
authorJeremy Foote <jdfoote1@gmail.com>
Tue, 19 May 2020 19:41:50 +0000 (15:41 -0400)
committerJeremy Foote <jdfoote1@gmail.com>
Tue, 19 May 2020 19:41:50 +0000 (15:41 -0400)
BabyNames.ipynb

index 8e3d040f47649b92776f523466f6a50b9947f28a..8173933d3ae801a07001de18d27650e4f6b54c93 100644 (file)
@@ -29,7 +29,7 @@
    "source": [
     "for name in boys.keys():\n",
     "    if name == \"mako\":\n",
    "source": [
     "for name in boys.keys():\n",
     "    if name == \"mako\":\n",
-    "        print(\"There were \" + str(ssadata.boys[name]) + \" boys named \" + name)"
+    "        print(\"There were \" + str(boys[name]) + \" boys named \" + name)"
    ]
   },
   {
    ]
   },
   {
@@ -67,7 +67,7 @@
    "source": [
     "for name in boys.keys():\n",
     "    if 'king' == name:\n",
    "source": [
     "for name in boys.keys():\n",
     "    if 'king' == name:\n",
-    "        print(name + \" \" + str(ssadata.boys[name]))"
+    "        print(name + \" \" + str(boys[name]))"
    ]
   },
   {
    ]
   },
   {
@@ -85,7 +85,7 @@
    "source": [
     "for name in girls.keys():\n",
     "    if 'queen' == name:\n",
    "source": [
     "for name in girls.keys():\n",
     "    if 'queen' == name:\n",
-    "        print(name + \" \" + str(ssadata.girls[name]))"
+    "        print(name + \" \" + str(girls[name]))"
    ]
   },
   {
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "How many boys' names are also girls' names? How many girls' names are also boys' name\n",
-    "s?\n"
+    "How many boys' names are also girls' names? How many girls' names are also boys' names?"
    ]
   },
   {
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "Take a prefix as input and print the number of boys and girls with that prefix (i.e., \"m\" would list babies whose names start with \"m\" and \"ma\" would list babies whose names start with \"ma\", etc).\n"
+    "Write a function that takes a prefix as input and prints the number of boys and girls with that prefix (e.g., get_names(\"m\") would list all names that start with \"m\" and get_names(\"ma\") would only list those that start with \"ma\")."
    ]
   },
   {
    ]
   },
   {
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.7.3"
+   "version": "3.7.4"
   }
  },
  "nbformat": 4,
   }
  },
  "nbformat": 4,

Benjamin Mako Hill || Want to submit a patch?