mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-05 17:08:02 +00:00
Fix #13, PEP8-ify notebooks.
This commit is contained in:
@@ -88,6 +88,7 @@
|
||||
"num_items = 10\n",
|
||||
"cache = [None] * (num_items + 1)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def fib_dynamic(n):\n",
|
||||
" # TODO: Implement me\n",
|
||||
" pass"
|
||||
@@ -130,7 +131,7 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"class TestFib(object):\n",
|
||||
" \n",
|
||||
"\n",
|
||||
" def test_fib(self, func):\n",
|
||||
" result = []\n",
|
||||
" for i in range(num_items):\n",
|
||||
@@ -139,12 +140,14 @@
|
||||
" assert_equal(result, fib_seq)\n",
|
||||
" print('Success: test_fib')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" test = TestFib()\n",
|
||||
" test.test_fib(fib_recursive)\n",
|
||||
" test.test_fib(fib_dynamic)\n",
|
||||
" test.test_fib(fib_iterative)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"if __name__ == '__main__':\n",
|
||||
" main()"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user