<commit_before>{
 "metadata": {
  "name": "test1"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%load_ext autograder\n",
      "%set_autograder test1_autograder.py"
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {
      "grade": true
     },
     "source": [
      "Problem 1"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Part A"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "def hello(name):\n",
      "    # YOUR ANSWER HERE\n",
      "    return \"Hello, {}!\".format(name)"
     ],
     "language": "python",
     "metadata": {
      "grade": true,
      "level": "Problem 1/Part A"
     },
     "outputs": [],
     "prompt_number": 2
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%grade Problem 1/Part A"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "Grade 'hello' with input 'Jessica' ... "
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ok\n",
        "Grade 'hello' with input 'Python' ... "
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ok\n",
        "\n",
        "----------------------------------------------------------------------\n",
        "Ran 2 tests in 0.002s\n",
        "\n",
        "OK\n"
       ]
      },
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>score</th>\n",
        "      <th>max_score</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>Problem 1/Part A</th>\n",
        "      <td> 1</td>\n",
        "      <td> 1</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "<p>1 rows \u00d7 2 columns</p>\n",
        "</div>"
       ],
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 3,
       "text": [
        "                  score  max_score\n",
        "Problem 1/Part A      1          1\n",
        "\n",
        "[1 rows x 2 columns]"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Part B"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "def goodbye(name):\n",
      "    # YOUR ANSWER HERE\n",
      "    return \"Goodbye, Jessica\""
     ],
     "language": "python",
     "metadata": {
      "grade": true,
      "level": "Problem 1/Part B"
     },
     "outputs": [],
     "prompt_number": 5
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%grade Problem 1/Part B"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "Grade 'goodbye' with input 'Jessica' ... "
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ok\n",
        "Grade 'goodbye' with input 'Python' ... "
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "FAIL\n",
        "\n",
        "======================================================================\n",
        "FAIL: Grade 'goodbye' with input 'Python'\n",
        "----------------------------------------------------------------------\n",
        "Traceback (most recent call last):\n",
        "  File \"/usr/local/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
        "    self.test(*self.arg)\n",
        "  File \"/Users/jhamrick/.ipython/extensions/autograder.py\", line 34, in wrapped_f\n",
        "    f(*args)\n",
        "  File \"<ipython-input-6-8691efaf29db>\", line 29, in grade_goodbye2\n",
        "    assert_eq(msg, \"Goodbye, Python\")\n",
        "AssertionError: 'Goodbye, Jessica' != 'Goodbye, Python'\n",
        "\n",
        "----------------------------------------------------------------------\n",
        "Ran 2 tests in 0.003s\n",
        "\n",
        "FAILED (failures=1)\n"
       ]
      },
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>score</th>\n",
        "      <th>max_score</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>Problem 1/Part B</th>\n",
        "      <td> 0.5</td>\n",
        "      <td> 1</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "<p>1 rows \u00d7 2 columns</p>\n",
        "</div>"
       ],
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 6,
       "text": [
        "                  score  max_score\n",
        "Problem 1/Part B    0.5          1\n",
        "\n",
        "[1 rows x 2 columns]"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {
      "grade": true
     },
     "source": [
      "Problem 2"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {
      "grade": true,
      "level": "Problem 2"
     },
     "source": [
      "**YOUR ANSWER HERE**"
     ]
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Autograder"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "The following code was used to grade this assignment:"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "```python\n",
      "from nose.tools import eq_ as assert_eq\n",
      "\n",
      "\n",
      "@score(problem=\"Problem 1/Part A\", points=0.5)\n",
      "def grade_hello1():\n",
      "    \"\"\"Grade 'hello' with input 'Jessica'\"\"\"\n",
      "    msg = hello(\"Jessica\")\n",
      "    assert_eq(msg, \"Hello, Jessica!\")\n",
      "\n",
      "\n",
      "@score(problem=\"Problem 1/Part A\", points=0.5)\n",
      "def grade_hello2():\n",
      "    \"\"\"Grade 'hello' with input 'Python'\"\"\"\n",
      "    msg = hello(\"Python\")\n",
      "    assert_eq(msg, \"Hello, Python!\")\n",
      "\n",
      "\n",
      "@score(problem=\"Problem 1/Part B\", points=0.5)\n",
      "def grade_goodbye1():\n",
      "    \"\"\"Grade 'goodbye' with input 'Jessica'\"\"\"\n",
      "    msg = goodbye(\"Jessica\")\n",
      "    assert_eq(msg, \"Goodbye, Jessica\")\n",
      "\n",
      "\n",
      "@score(problem=\"Problem 1/Part B\", points=0.5)\n",
      "def grade_goodbye2():\n",
      "    \"\"\"Grade 'goodbye' with input 'Python'\"\"\"\n",
      "    msg = goodbye(\"Python\")\n",
      "    assert_eq(msg, \"Goodbye, Python\")\n",
      "\n",
      "```"
     ]
    }
   ],
   "metadata": {}
  }
 ]
}<commit_msg>Update graded example notebook<commit_after>{
 "metadata": {
  "name": "test1"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%load_ext autograder\n",
      "%set_autograder test1_autograder.py"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {
      "grade": true
     },
     "source": [
      "Problem 1"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Part A"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "def hello(name):\n",
      "    # YOUR ANSWER HERE\n",
      "    return \"Hello, {}!\".format(name)"
     ],
     "language": "python",
     "metadata": {
      "grade": true,
      "level": "Problem 1/Part A"
     },
     "outputs": [],
     "prompt_number": 2
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%grade Problem 1/Part A"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "Grade 'hello' with input 'Jessica' ... "
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ok\n",
        "Grade 'hello' with input 'Python' ... "
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ok\n",
        "\n",
        "----------------------------------------------------------------------\n",
        "Ran 2 tests in 0.002s\n",
        "\n",
        "OK\n"
       ]
      },
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>score</th>\n",
        "      <th>max_score</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>Problem 1/Part A</th>\n",
        "      <td> 1</td>\n",
        "      <td> 1</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "<p>1 rows \u00d7 2 columns</p>\n",
        "</div>"
       ],
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 3,
       "text": [
        "                  score  max_score\n",
        "Problem 1/Part A      1          1\n",
        "\n",
        "[1 rows x 2 columns]"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Part B"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "def goodbye(name):\n",
      "    # YOUR ANSWER HERE\n",
      "    return \"Goodbye, Jessica\""
     ],
     "language": "python",
     "metadata": {
      "grade": true,
      "level": "Problem 1/Part B"
     },
     "outputs": [],
     "prompt_number": 5
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%grade Problem 1/Part B"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "Grade 'goodbye' with input 'Jessica' ... "
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "ok\n",
        "Grade 'goodbye' with input 'Python' ... "
       ]
      },
      {
       "output_type": "stream",
       "stream": "stderr",
       "text": [
        "FAIL\n",
        "\n",
        "======================================================================\n",
        "FAIL: Grade 'goodbye' with input 'Python'\n",
        "----------------------------------------------------------------------\n",
        "Traceback (most recent call last):\n",
        "  File \"/usr/local/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
        "    self.test(*self.arg)\n",
        "  File \"/Users/jhamrick/.ipython/extensions/autograder.py\", line 34, in wrapped_f\n",
        "    f(*args)\n",
        "  File \"<ipython-input-6-8691efaf29db>\", line 29, in grade_goodbye2\n",
        "    assert_eq(msg, \"Goodbye, Python\")\n",
        "AssertionError: 'Goodbye, Jessica' != 'Goodbye, Python'\n",
        "\n",
        "----------------------------------------------------------------------\n",
        "Ran 2 tests in 0.004s\n",
        "\n",
        "FAILED (failures=1)\n"
       ]
      },
      {
       "html": [
        "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
        "<table border=\"1\" class=\"dataframe\">\n",
        "  <thead>\n",
        "    <tr style=\"text-align: right;\">\n",
        "      <th></th>\n",
        "      <th>score</th>\n",
        "      <th>max_score</th>\n",
        "    </tr>\n",
        "  </thead>\n",
        "  <tbody>\n",
        "    <tr>\n",
        "      <th>Problem 1/Part B</th>\n",
        "      <td> 0.5</td>\n",
        "      <td> 1</td>\n",
        "    </tr>\n",
        "  </tbody>\n",
        "</table>\n",
        "<p>1 rows \u00d7 2 columns</p>\n",
        "</div>"
       ],
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 6,
       "text": [
        "                  score  max_score\n",
        "Problem 1/Part B    0.5          1\n",
        "\n",
        "[1 rows x 2 columns]"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {
      "grade": true
     },
     "source": [
      "Problem 2"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {
      "grade": true,
      "level": "Problem 2"
     },
     "source": [
      "**YOUR ANSWER HERE**"
     ]
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Autograder"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "The following code was used to grade this assignment:"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "```python\n",
      "from nose.tools import eq_ as assert_eq\n",
      "\n",
      "\n",
      "@score(problem=\"Problem 1/Part A\", points=0.5)\n",
      "def grade_hello1():\n",
      "    \"\"\"Grade 'hello' with input 'Jessica'\"\"\"\n",
      "    msg = hello(\"Jessica\")\n",
      "    assert_eq(msg, \"Hello, Jessica!\")\n",
      "\n",
      "\n",
      "@score(problem=\"Problem 1/Part A\", points=0.5)\n",
      "def grade_hello2():\n",
      "    \"\"\"Grade 'hello' with input 'Python'\"\"\"\n",
      "    msg = hello(\"Python\")\n",
      "    assert_eq(msg, \"Hello, Python!\")\n",
      "\n",
      "\n",
      "@score(problem=\"Problem 1/Part B\", points=0.5)\n",
      "def grade_goodbye1():\n",
      "    \"\"\"Grade 'goodbye' with input 'Jessica'\"\"\"\n",
      "    msg = goodbye(\"Jessica\")\n",
      "    assert_eq(msg, \"Goodbye, Jessica\")\n",
      "\n",
      "\n",
      "@score(problem=\"Problem 1/Part B\", points=0.5)\n",
      "def grade_goodbye2():\n",
      "    \"\"\"Grade 'goodbye' with input 'Python'\"\"\"\n",
      "    msg = goodbye(\"Python\")\n",
      "    assert_eq(msg, \"Goodbye, Python\")\n",
      "\n",
      "```"
     ]
    }
   ],
   "metadata": {}
  }
 ]
}
{'fraction_non_alphanumeric': 0.2501639774367047, 'fraction_numerical': 0.01475796930342385, 'mean_word_length': 1.367914272402547, 'pattern_counts': {'":': 213, '<': 109, '<?xml version=': 0, '>': 109, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4090426', 'n_tokens_mistral': 5533, 'n_tokens_neox': 5262, 'n_words': 955}