Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDowney committed Feb 26, 2020
2 parents 878bf99 + 0c36e07 commit 3aaf2e1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions book/book.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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}

Expand Down Expand Up @@ -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}

Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -8472,7 +8472,7 @@ \section{Exercises}
\begin{exercise}
\index{append method}
\index{method append}
\index{method!append}
\index{list!concatenation}
\index{concatenation!list}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3aaf2e1

Please sign in to comment.