mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-05 00:48:03 +00:00
Fix #13, PEP8-ify notebooks.
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
"source": [
|
||||
"## Constraints\n",
|
||||
"\n",
|
||||
|
||||
"See the [HackerRank problem page](https://www.hackerrank.com/challenges/utopian-tree)."
|
||||
]
|
||||
},
|
||||
@@ -73,9 +72,6 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# cycles = 0, print 1: base case\n",
|
||||
"# cycles = 1, print 2: i = 1: 1 * 2\n",
|
||||
"# cycles = 4, print 7: i = 1: 1 * 2, i = 2: 2 + 1, i = 3: 3 * 2, i = 4: 6 + 1\n",
|
||||
"def calc_utopian_tree_height(cycles):\n",
|
||||
" # TODO: Implement me\n",
|
||||
" pass"
|
||||
@@ -110,10 +106,12 @@
|
||||
" assert_equal(calc_utopian_tree_height(4), 7)\n",
|
||||
" print('Success: test_utopian_tree')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" test = TestUtopianTree()\n",
|
||||
" test.test_utopian_tree()\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"if __name__ == '__main__':\n",
|
||||
" main()"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user