Skip to content

Commit bd56b28

Browse files
committed
Merge branch 'master' of https://github.com/AllenDowney/ModSimPy
2 parents 085591a + ba7fe78 commit bd56b28

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ conda install jupyterlab pandas seaborn sympy beautifulsoup4 lxml html5lib pytab
8282
```
8383
To install Pint, run this command:
8484
```
85-
conda install -c unidata pint
85+
conda install -c conda-forge pint
8686
```
8787
And to install the ModSim library, run this command:
8888
```
@@ -164,7 +164,7 @@ To start Jupyter on macOS or Linux, open a Terminal; on Windows, open
164164
Git Bash. Use to “change directory" into the code directory in the
165165
repository:
166166
```
167-
cd ModSimPy/code
167+
cd ModSimPy/notebooks
168168
```
169169
Then launch the Jupyter notebook server:
170170
```

book/book.tex

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
\newcommand{\thetitle}{Modeling and Simulation in Python}
1414
\newcommand{\thesubtitle}{}
1515
\newcommand{\theauthors}{Allen B. Downey}
16-
\newcommand{\theversion}{3.4.1}
16+
\newcommand{\theversion}{3.4.2}
1717

1818

1919
%%%% Both LATEX and PLASTEX
@@ -445,7 +445,7 @@ \section{Installing Python}
445445

446446
\section{Copying my files}
447447

448-
The simplest way to get the files for this book is to download a Zip archive from \url{http://modsimpy.com/zip}. You will need a program like WinZip or gzip to unpack the Zip file. Make a note of the location of the files you download.
448+
The simplest way to get the files for this book is to download a Zip archive from \url{http://modsimpy.com/zip}. You will need a program like WinZip or gzip to unpack the Zip file. Make a note of the location of the files you unpack.
449449

450450
If you download the Zip file, you can skip the rest of this section, which explains how to use Git.
451451

@@ -494,10 +494,16 @@ \section{Running Jupyter}
494494

495495
\index{Jupyter}
496496

497-
To start Jupyter on macOS or Linux, open a Terminal; on Windows, open Git Bash. Use \py{cd} to ``change directory" into the code directory in the repository:
497+
To start Jupyter on macOS or Linux, open a Terminal; on Windows, open Git Bash. Use \py{cd} to ``change directory" into the directory in the repository that contains the notebooks. If you downloaded the Zip file, it's probably:
498498

499499
\begin{code}
500-
cd ModSimPy/code
500+
cd ModSimPy-master/notebooks
501+
\end{code}
502+
503+
If you cloned it with Git, it's probably:
504+
505+
\begin{code}
506+
cd ModSimPy/notebooks
501507
\end{code}
502508

503509
Then launch the Jupyter notebook server:
@@ -506,7 +512,7 @@ \section{Running Jupyter}
506512
jupyter notebook
507513
\end{code}
508514

509-
Jupyter should open a window in a browser, and you should see the list of notebooks in my repository. Click on the first notebook, \py{chap01.ipynb} and follow the instructions to run the first few ``cells". The first time you run a notebook, it might take several seconds to start, while some Python files get initialized. After that, it should run faster.
515+
Jupyter should open a window in a browser, and you should see the list of notebooks in my repository. Click on the first notebook, \py{chap01.ipynb} and follow the instructions to run the first few ``cells". The first time you run a notebook, it might take several seconds to start while some Python files get initialized. After that, it should run faster.
510516

511517
Feel free to read through the notebook, but it might not make sense until you read Chapter~\ref{chap01}.
512518

@@ -935,7 +941,7 @@ \section{Print statements}
935941

936942
\begin{python}
937943
def bike_to_wellesley():
938-
print('Moving a bike to Wellesley')
944+
print('Moving a bike to Wellesley')
939945
bikeshare.olin -= 1
940946
bikeshare.wellesley += 1
941947
\end{python}
@@ -1395,7 +1401,7 @@ \section{Negative bikes}
13951401
state.olin += 1
13961402
\end{python}
13971403

1398-
The first line checks whether the number of bikes at Wellesley is zero. If so, it uses a a {\bf return statement}, which causes the function to end immediately, without running the rest of the statements. So if there are no bikes at Wellesley, we ``return" from \py{bike_to_olin} without changing the state.
1404+
The first line checks whether the number of bikes at Wellesley is zero. If so, it uses a {\bf return statement}, which causes the function to end immediately, without running the rest of the statements. So if there are no bikes at Wellesley, we ``return" from \py{bike_to_olin} without changing the state.
13991405

14001406
\index{return statement}
14011407
\index{statement!return}

notebooks/chap02.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@
765765
"cell_type": "markdown",
766766
"metadata": {},
767767
"source": [
768-
"The suffix of the filename indicates the format you want. This example saves the current figure in a PDF file named `chap01-fig01.pdf`."
768+
"The suffix of the filename indicates the format you want. This example saves the current figure in a PDF file."
769769
]
770770
},
771771
{

0 commit comments

Comments
 (0)