Skip to content

Commit 11f14dd

Browse files
committed
Update documentation
1 parent f86cf50 commit 11f14dd

28 files changed

Lines changed: 369 additions & 387 deletions
1.53 KB
Loading

_sources/chap02.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@
666666
"id": "cff0414b",
667667
"metadata": {},
668668
"source": [
669-
"Similarly, an import statement has an effect -- it imports a module so we can use the values and functions it contains -- but it has no visible effect."
669+
"Similarly, an import statement has an effect -- it imports a module so we can use the variables and functions it contains -- but it has no visible effect."
670670
]
671671
},
672672
{
@@ -1329,7 +1329,7 @@
13291329
"A special word used to specify the structure of a program.\n",
13301330
"\n",
13311331
"**import statement:**\n",
1332-
"A statement that reads a module file and creates a module object.\n",
1332+
"A statement that reads a module file so we can use the variables and functions it contains.\n",
13331333
"\n",
13341334
"**module:**\n",
13351335
"A file that contains Python code, including function definitions and sometimes other statements.\n",

_sources/chap06.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"When you call one of these functions, it returns a value you can assign to a variable or use as part of an expression.\n",
5050
"\n",
5151
"The functions we have written so far are different.\n",
52-
"Some use the `print` function to display values, and some use `Turtle` functions to draw figures.\n",
52+
"Some use the `print` function to display values, and some use turtle functions to draw figures.\n",
5353
"But they don't return values we assign to variables or use in expressions.\n",
5454
"\n",
5555
"In this chapter, we'll see how to write functions that return values."
@@ -1162,7 +1162,7 @@
11621162
"n! &= n~(n-1)!\n",
11631163
"\\end{aligned}$$ \n",
11641164
"\n",
1165-
"This definition says that the factorial of 0 is 1, and the factorial of any other value, $n$, is $n$ multiplied by the factorial of $n-1$.\n",
1165+
"This definition says that the factorial of $0$ is $1$, and the factorial of any other value, $n$, is $n$ multiplied by the factorial of $n-1$.\n",
11661166
"\n",
11671167
"If you can write a recursive definition of something, you can write a Python program to evaluate it. \n",
11681168
"Following an incremental development process, we'll start with a function that take `n` as a parameter and always returns `0`."
@@ -1184,7 +1184,7 @@
11841184
"id": "ee1f63b8",
11851185
"metadata": {},
11861186
"source": [
1187-
"Now let's add the first part of the definition -- if the argument happens to be 0, all we have to do is return 1:"
1187+
"Now let's add the first part of the definition -- if the argument happens to be `0`, all we have to do is return `1`:"
11881188
]
11891189
},
11901190
{
@@ -1207,7 +1207,7 @@
12071207
"metadata": {},
12081208
"source": [
12091209
"Now let's fill in the second part -- if `n` is not `0`, we have to make a recursive\n",
1210-
"call to find the factorial of $n-1$ and then multiply the result by $n$:"
1210+
"call to find the factorial of `n-1` and then multiply the result by `n`:"
12111211
]
12121212
},
12131213
{
@@ -1401,7 +1401,7 @@
14011401
"metadata": {},
14021402
"source": [
14031403
"If you try to follow the flow of execution here, even for small values of $n$, your head explodes.\n",
1404-
"But according to the leap of faith, if you assume that the two recursive calls work correctly, you can be confident that the last return statement is correct.\n",
1404+
"But according to the leap of faith, if you assume that the two recursive calls work correctly, you can be confident that the last `return` statement is correct.\n",
14051405
"\n",
14061406
"As an aside, this way of computing Fibonacci numbers is very inefficient.\n",
14071407
"In [Chapter 10](section_memos) I'll explain why and suggest a way to improve it."
@@ -1652,7 +1652,7 @@
16521652
"metadata": {},
16531653
"source": [
16541654
"`space` is a string of space characters that controls the indentation of\n",
1655-
"the output. Here is the result of `factorial(4)` :"
1655+
"the output. Here is the result of `factorial(3)` :"
16561656
]
16571657
},
16581658
{
@@ -2332,7 +2332,7 @@
23322332
"name": "python",
23332333
"nbconvert_exporter": "python",
23342334
"pygments_lexer": "ipython3",
2335-
"version": "3.10.14"
2335+
"version": "3.10.11"
23362336
}
23372337
},
23382338
"nbformat": 4,

0 commit comments

Comments
 (0)