Fix #13, PEP8-ify notebooks.

This commit is contained in:
Donne Martin
2015-07-11 15:34:52 -04:00
parent 374d67ff30
commit 04083b2011
25 changed files with 210 additions and 173 deletions

View File

@@ -34,7 +34,6 @@
"source": [
"## Constraints\n",
"\n",
"* Is a single character or number a palindrome?\n",
" * No\n",
"* Can we assume we already have a linked list class that can be used for this problem?\n",
@@ -92,7 +91,7 @@
"outputs": [],
"source": [
"class MyLinkedList(LinkedList):\n",
" \n",
"\n",
" def is_palindrome(self):\n",
" # TODO: Implement me\n",
" pass"
@@ -127,7 +126,7 @@
"\n",
"\n",
"class TestPalindrome(object):\n",
" \n",
"\n",
" def test_palindrome(self):\n",
" print('Test: Empty list')\n",
" linked_list = MyLinkedList()\n",
@@ -158,13 +157,15 @@
" linked_list.append(2)\n",
" linked_list.append(1)\n",
" assert_equal(linked_list.is_palindrome(), True)\n",
" \n",
"\n",
" print('Success: test_palindrome')\n",
"\n",
"\n",
"def main():\n",
" test = TestPalindrome()\n",
" test.test_palindrome()\n",
"\n",
"\n",
"if __name__ == '__main__':\n",
" main()"
]