mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-09 02:48:02 +00:00
Fix #13, PEP8-ify notebooks.
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
|
||||
"* None"
|
||||
]
|
||||
},
|
||||
@@ -92,13 +91,14 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"class Node(object):\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" def __init__(self, data):\n",
|
||||
" # TODO: Implement me\n",
|
||||
" pass\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"class Stack(object):\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" def __init__(self, top=None):\n",
|
||||
" # TODO: Implement me\n",
|
||||
" pass\n",
|
||||
@@ -144,7 +144,7 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"class TestStack(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",
|
||||
@@ -172,13 +172,15 @@
|
||||
" assert_equal(stack.pop(), 1)\n",
|
||||
" assert_equal(stack.peek(), None)\n",
|
||||
" assert_equal(stack.is_empty(), True)\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" print('Success: test_end_to_end')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" test = TestStack()\n",
|
||||
" test.test_end_to_end()\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"\n",
|
||||
"if __name__ == '__main__':\n",
|
||||
" main()"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user