Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #62

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions book/book.tex
Expand Up @@ -8968,8 +8968,8 @@ \section{Dictionaries and lists}
>>> hist = histogram('parrot')
>>> hist
{'a': 1, 'p': 1, 'r': 2, 't': 1, 'o': 1}
>>> inverse = invert_dict(hist)
>>> inverse
>>> inv = invert_dict(hist)
>>> inv
{1: ['a', 'p', 't', 'o'], 2: ['r']}
\end{verbatim}

Expand All @@ -8980,7 +8980,7 @@ \section{Dictionaries and lists}
\label{fig.dict1}
\end{figure}

Figure~\ref{fig.dict1} is a state diagram showing {\tt hist} and {\tt inverse}.
Figure~\ref{fig.dict1} is a state diagram showing {\tt hist} and {\tt inv}.
A dictionary is represented as a box with the type {\tt dict} above it
and the key-value pairs inside. If the values are integers, floats or
strings, I draw them inside the box, but I usually draw lists
Expand Down Expand Up @@ -9041,7 +9041,7 @@ \section{Memos}
\index{function!fibonacci}

To understand why, consider Figure~\ref{fig.fibonacci}, which shows
the {\bf call graph} for {\tt fibonacci} with {\tt n=4}:
the {\bf call graph} for {\tt fibonacci} with {\tt n=4}.

\begin{figure}
\centerline
Expand Down Expand Up @@ -10367,7 +10367,7 @@ \chapter{Case study: data structure selection}
At this point you have learned about Python's core data structures,
and you have seen some of the algorithms that use them.
If you would like to know more about algorithms, this might be a good
time to read Chapter~\ref{algorithms}.
time to read Appendix~\ref{algorithms}.
But you don't have to read it before you go on; you can read
it whenever you are interested.

Expand Down Expand Up @@ -10637,7 +10637,7 @@ \section{Most common words}
and sort it.

The following function takes a histogram and returns a list of
word-frequency tuples:
frequency-word tuples:

\begin{verbatim}
def most_common(hist):
Expand Down Expand Up @@ -10968,7 +10968,7 @@ \section{Data structures}

Using Markov analysis to generate random text is fun, but there is
also a point to this exercise: data structure selection. In your
solution to the previous exercises, you had to choose:
solution to the previous exercise, you had to choose:

\begin{itemize}

Expand Down