|
88 | 88 | "source": [ |
89 | 89 | "### Importing modsim\n", |
90 | 90 | "\n", |
91 | | - "The following cell imports `modsim`, which is a collection of functions we will use throughout the book. Whenever you start the notebook, you will have to run the following cell. It does two things:\n", |
| 91 | + "The following cell imports `modsim`, which is a collection of functions we will use throughout the book. Whenever you start the notebook, you will have to run the following cell. It does three things:\n", |
92 | 92 | "\n", |
93 | 93 | "1. It uses a Jupyter \"magic command\" to specify whether figures should appear in the notebook, or pop up in a new window.\n", |
94 | 94 | "\n", |
95 | | - "2. It imports everything defined in `modsim`.\n", |
| 95 | + "2. It configures Jupyter to display some values that would otherwise be invisible. \n", |
| 96 | + "\n", |
| 97 | + "3. It imports everything defined in `modsim`.\n", |
96 | 98 | "\n", |
97 | 99 | "Select the following cell and press SHIFT-ENTER to run it." |
98 | 100 | ] |
|
119 | 121 | "cell_type": "markdown", |
120 | 122 | "metadata": {}, |
121 | 123 | "source": [ |
122 | | - "The first time you run this on a new installation of Python, it might produce a warning message in pink. That's probably ok, but if you get a message that says `modsim.py depends on Python 3.6 features`, that means you have an older version of Python, and some features in `modsim.py` won't work correctly.\n", |
| 124 | + "The first time you run this on a new installation of Python, it might produce a warning message in pink. That's probably ok, but if you get a message that says `modsim.py depends on Python 3.7 features`, that means you have an older version of Python, and some features in `modsim.py` won't work correctly.\n", |
123 | 125 | "\n", |
124 | 126 | "If you need a newer version of Python, I recommend installing Anaconda. You'll find more information in the preface of the book." |
125 | 127 | ] |
|
259 | 261 | "2. The last line usually tells you what type of error happened, and sometimes additional information.\n", |
260 | 262 | "3. The previous lines are a \"traceback\" of what was happening when the error occurred. The first section of the traceback shows the code you wrote. The following sections are often from Python libraries.\n", |
261 | 263 | "\n", |
262 | | - "In this example, you should get a `DimensionalityError`, which is defined by Pint to indicate that you have violated a rules of dimensional analysis: you cannot add quantities with different dimensions." |
| 264 | + "In this example, you should get a `DimensionalityError`, which is defined by Pint to indicate that you have violated a rules of dimensional analysis: you cannot add quantities with different dimensions.\n", |
| 265 | + "\n", |
| 266 | + "Before you go on, you might want to delete the erroneous code so the notebook can run without errors." |
263 | 267 | ] |
264 | 268 | }, |
265 | 269 | { |
|
317 | 321 | "metadata": {}, |
318 | 322 | "outputs": [], |
319 | 323 | "source": [ |
320 | | - "v = a * t\n", |
321 | | - "v" |
| 324 | + "v = a * t" |
322 | 325 | ] |
323 | 326 | }, |
324 | 327 | { |
|
475 | 478 | "name": "python", |
476 | 479 | "nbconvert_exporter": "python", |
477 | 480 | "pygments_lexer": "ipython3", |
478 | | - "version": "3.6.4" |
| 481 | + "version": "3.6.5" |
479 | 482 | } |
480 | 483 | }, |
481 | 484 | "nbformat": 4, |
|
0 commit comments