From 2b92f51a4ec16b0c17affe6751012b0c86e0c3a2 Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Tue, 23 Feb 2016 06:13:05 -0500 Subject: [PATCH] Polish set of stacks challenge --- .../set_of_stacks_challenge.ipynb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/stacks_queues/set_of_stacks/set_of_stacks_challenge.ipynb b/stacks_queues/set_of_stacks/set_of_stacks_challenge.ipynb index a0ca6d1..9055e43 100644 --- a/stacks_queues/set_of_stacks/set_of_stacks_challenge.ipynb +++ b/stacks_queues/set_of_stacks/set_of_stacks_challenge.ipynb @@ -36,7 +36,7 @@ "\n", "* Can we assume we already have a stack class that can be used for this problem?\n", " * Yes\n", - "* If a stack becomes full, we should automatically create one?\n", + "* If a stack becomes full, should automatically create one?\n", " * Yes\n", "* If a stack becomes empty, should we delete it?\n", " * Yes" @@ -51,7 +51,7 @@ "* Push and pop on an empty stack\n", "* Push and pop on a non-empty stack\n", "* Push on a capacity stack to create a new one\n", - "* Pop on a one element stack to destroy it" + "* Pop on a stack to destroy it" ] }, { @@ -151,8 +151,7 @@ "\n", " def test_set_of_stacks(self):\n", " print('Test: Push on an empty stack')\n", - " capacity = 2\n", - " stacks = SetOfStacks(capacity)\n", + " stacks = SetOfStacks(capacity=2)\n", " stacks.push(3)\n", "\n", " print('Test: Push on a non-empty stack')\n", @@ -161,7 +160,7 @@ " print('Test: Push on a capacity stack to create a new one')\n", " stacks.push('a')\n", "\n", - " print('Test: Pop on a one element stack to destroy it')\n", + " print('Test: Pop on a stack to destroy it')\n", " assert_equal(stacks.pop(), 'a')\n", "\n", " print('Test: Pop general case')\n", @@ -195,21 +194,21 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 2", + "display_name": "Python 3", "language": "python", - "name": "python2" + "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 2 + "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.10" + "pygments_lexer": "ipython3", + "version": "3.4.3" } }, "nbformat": 4,