From c645ce560994fbf195156b63dd8db735f9792a36 Mon Sep 17 00:00:00 2001 From: jorge-e Date: Tue, 8 Oct 2019 03:47:14 -0300 Subject: [PATCH 1/6] Some changes in the index (references to function) I suggest these changes to join some references to function. --- book/book.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/book/book.tex b/book/book.tex index e7d2326..9cdc534 100644 --- a/book/book.tex +++ b/book/book.tex @@ -1961,7 +1961,7 @@ \section{Function calls} \section{Math functions} \index{math function} -\index{function, math} +\index{function!math} Python has a math module that provides most of the familiar mathematical functions. A {\bf module} is a file that contains a @@ -2007,7 +2007,7 @@ \section{Math functions} \index{sine function} \index{radian} \index{trigonometric function} -\index{function, trigonometric} +\index{function!trigonometric} The second example finds the sine of {\tt radians}. The variable name {\tt radians} is a hint that {\tt sin} and the other trigonometric functions ({\tt cos}, {\tt tan}, etc.) take arguments in radians. To @@ -2454,8 +2454,8 @@ \section{Stack diagrams} \section{Fruitful functions and void functions} \index{fruitful function} \index{void function} -\index{function, fruitful} -\index{function, void} +\index{function!fruitful} +\index{function!void} Some of the functions we have used, such as the math functions, return results; for lack of a better name, I call them {\bf fruitful @@ -2522,7 +2522,7 @@ \section{Fruitful functions and void functions} \section{Why functions?} -\index{function, reasons for} +\index{function!reasons for} It may not be clear why it is worth the trouble to divide a program into functions. There are several reasons: @@ -9696,7 +9696,7 @@ \section{Tuples as return values} \index{tuple} \index{value!tuple} \index{return value!tuple} -\index{function, tuple as return value} +\index{function!tuple as return value} Strictly speaking, a function can only return one value, but if the value is a tuple, the effect is the same as returning From 576dcc023202c5faf608d0473b2ed310a662d199 Mon Sep 17 00:00:00 2001 From: Jorge Espinoza Date: Thu, 10 Oct 2019 18:36:14 -0300 Subject: [PATCH 2/6] Adding a comma that can make a difference This book is useful for people who don't know math, so it might be not obvious. If they read "the square root of two divided by two", it could be "the square root of (two divided by two)". This is a common trap on too many math test I've read. If you add the comma, you can read "(the square root of two), divided by two". Whitout the comma, you could make life harder for people frustrated with maths. Let's make it easier! --- book/book.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/book.tex b/book/book.tex index 9cdc534..d0566d0 100644 --- a/book/book.tex +++ b/book/book.tex @@ -2028,7 +2028,7 @@ \section{Math functions} If you know trigonometry, you can check the previous result by comparing it to -the square root of two divided by two: +the square root of two, divided by two: \index{sqrt function} \index{function!sqrt} From 595052a5ccdb0c3b7dda8c9502a1edda1ef0cf87 Mon Sep 17 00:00:00 2001 From: Jorge Espinoza Date: Sat, 14 Dec 2019 20:17:54 -0300 Subject: [PATCH 3/6] Change 'triangle' to 'right triangle' I am absolutely sure that it is not obvious to someone who does not know math, even if there is the word 'hypotenuse'. --- book/book.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/book.tex b/book/book.tex index d0566d0..9b35f8f 100644 --- a/book/book.tex +++ b/book/book.tex @@ -4617,7 +4617,7 @@ \section{Incremental development} % I chose these values so that the horizontal distance is 3 and the vertical distance is 4; that way, the result is 5, the hypotenuse -of a 3-4-5 triangle. When testing a function, it is +of a 3-4-5 right triangle. When testing a function, it is useful to know the right answer. \index{testing!knowing the answer} From 54245db1ecaafde6ce350933db3db91c1a6366c9 Mon Sep 17 00:00:00 2001 From: Jorge Espinoza Date: Sat, 28 Dec 2019 22:56:26 -0300 Subject: [PATCH 4/6] Correct index item --- book/book.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/book.tex b/book/book.tex index 9b35f8f..f8f8ce1 100644 --- a/book/book.tex +++ b/book/book.tex @@ -8472,7 +8472,7 @@ \section{Exercises} \begin{exercise} \index{append method} -\index{method append} +\index{method!append} \index{list!concatenation} \index{concatenation!list} From 302aec5e088b9d177d5744caf95ab9a4c0606a95 Mon Sep 17 00:00:00 2001 From: Jorge Espinoza Date: Sun, 29 Dec 2019 00:25:10 -0300 Subject: [PATCH 5/6] Remove unnecessary colon In the code, the figure is after the colon. In the pdf, the figure is elsewhere. --- book/book.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/book.tex b/book/book.tex index 9b35f8f..757f0eb 100644 --- a/book/book.tex +++ b/book/book.tex @@ -7402,7 +7402,7 @@ \section{Lists are mutable} Figure~\ref{fig.liststate} shows the state diagram for {\tt -cheeses}, {\tt numbers} and {\tt empty}: +cheeses}, {\tt numbers} and {\tt empty}. \index{state diagram} \index{diagram!state} From 0c36e079ed0edb38b8717626b10f6015ef7383d9 Mon Sep 17 00:00:00 2001 From: Allen Downey Date: Fri, 10 Jan 2020 12:30:00 -0500 Subject: [PATCH 6/6] Remove reference to TurtleWorld --- book/book.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/book.tex b/book/book.tex index 51d4da9..56dfaee 100644 --- a/book/book.tex +++ b/book/book.tex @@ -2990,7 +2990,7 @@ \section{Simple repetition} \section{Exercises} -The following is a series of exercises using TurtleWorld. They +The following is a series of exercises using the {\tt turtle} module. They are meant to be fun, but they have a point, too. While you are working on them, think about what the point is. @@ -4375,7 +4375,7 @@ \section{Exercises} The following exercises use the {\tt turtle} module, described in Chapter~\ref{turtlechap}: -\index{TurtleWorld} +\index{turtle module} \begin{exercise}