Skip to content

Commit 24073b1

Browse files
committed
minor tweaks
1 parent ed29697 commit 24073b1

12 files changed

+13
-791
lines changed

Part 2/Section 03 - Project 1/02 - Project Solution - Goal 1.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@
10931093
"source": [
10941094
"By the way, did you notice that we spent at the same, if not more, amount of time **testing** our code as we did **writing** it?\n",
10951095
"\n",
1096-
"In practice, that is often how that goes - you should always test your code - you obviously cannot test every case, but you should always try to test everything at least once, and then also cover edge cases if there are any.\n",
1096+
"In practice, that is often how that goes - you should always test your code - you obviously cannot test every data combination, but you should always try to test all your methods and code branches at least once (coverage), and then also cover edge cases if there are any to make sure those are handled as expected.\n",
10971097
"\n",
10981098
"You should also try to ensure, within reason, that all the code you wrote is tested (i.e. executed, or *exercised*) during your tests - this is called **test coverage**, or sometimes **code coverage**."
10991099
]

Part 2/Section 05 - Project 2/02 - Project Solution - Goal 1.ipynb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@
88
]
99
},
1010
{
11-
"cell_type": "raw",
11+
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14+
"Our starting point is where we left off at the end of Project 1.\n",
15+
"\n",
1416
"Our first goal is to rewrite all properties as lazy properties."
1517
]
1618
},
1719
{
1820
"cell_type": "markdown",
1921
"metadata": {},
2022
"source": [
21-
"Here is where we left off with the Polygon class in the previous project:"
23+
"Here is the code we ended up with in Project 1:"
2224
]
2325
},
2426
{
@@ -103,7 +105,9 @@
103105
{
104106
"cell_type": "code",
105107
"execution_count": 13,
106-
"metadata": {},
108+
"metadata": {
109+
"collapsed": true
110+
},
107111
"outputs": [],
108112
"source": [
109113
"class Polygon:\n",
@@ -182,7 +186,7 @@
182186
"cell_type": "markdown",
183187
"metadata": {},
184188
"source": [
185-
"And let's run the same unit test we wrote for the earlier project:"
189+
"And let's run the same unit test we wrote for Project 1:"
186190
]
187191
},
188192
{
@@ -278,7 +282,9 @@
278282
{
279283
"cell_type": "code",
280284
"execution_count": 15,
281-
"metadata": {},
285+
"metadata": {
286+
"collapsed": true
287+
},
282288
"outputs": [],
283289
"source": [
284290
"test_polygon()"

Part 2/Section 06 - Generators/02 - Example - Fibonacci Sequence.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"cell_type": "markdown",
4545
"metadata": {},
4646
"source": [
47-
"Although we can certainly use a recursive approach to calculate the *n-th* number in the sequence, it is not a very effective method - we can of course help it by using memoization, but we'll still run in Python's maximum recursion depth (which we can change also) - but overall it's not very efficient:"
47+
"Although we can certainly use a recursive approach to calculate the *n-th* number in the sequence, it is not a very effective method - we can of course help it by using memoization, but we'll still run into Python's maximum recursion depth. In Python there is a maximum number of times a recursive function can call itself (creating a stack frame at every nested call) before Python gives us an exception that we have exceeded the maximum permitted depth (the number of recursive calls). We can actually change that number if we want to, but if we're running into that limitation, it might be better creating a non-recursive algorithm - recursion can be elegant, but not particularly efficient."
4848
]
4949
},
5050
{

0 commit comments

Comments
 (0)