Fix #13, PEP8-ify notebooks.

This commit is contained in:
Donne Martin
2015-07-11 15:39:59 -04:00
parent 4566d1a803
commit 3712839cc9
26 changed files with 139 additions and 92 deletions

View File

@@ -35,7 +35,6 @@
"source": [
"## Constraints\n",
"\n",
"* If there is one item in the list, do you expect the first and last pointers to both point to it?\n",
" * Yes\n",
"* If there are no items on the list, do you expect the first and last pointers to be None?\n",
@@ -87,13 +86,14 @@
"outputs": [],
"source": [
"class Node(object):\n",
" \n",
"\n",
" def __init__(self, data):\n",
" # TODO: Implement me\n",
" pass\n",
"\n",
"\n",
"class Queue(object):\n",
" \n",
"\n",
" def __init__(self):\n",
" # TODO: Implement me\n",
" pass\n",
@@ -131,7 +131,7 @@
"\n",
"\n",
"class TestQueue(object):\n",
" \n",
"\n",
" # TODO: It would be better if we had unit tests for each\n",
" # method in addition to the following end-to-end test\n",
" def test_end_to_end(self):\n",
@@ -154,13 +154,15 @@
" assert_equal(queue.dequeue(), 2)\n",
" assert_equal(queue.dequeue(), 3)\n",
" assert_equal(queue.dequeue(), 4)\n",
" \n",
"\n",
" print('Success: test_end_to_end')\n",
"\n",
"\n",
"def main():\n",
" test = TestQueue()\n",
" test.test_end_to_end()\n",
" \n",
"\n",
"\n",
"if __name__ == '__main__':\n",
" main()"
]