Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDowney committed Apr 26, 2024
1 parent cd9be05 commit 765e526
Show file tree
Hide file tree
Showing 50 changed files with 15,084 additions and 848 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 16 additions & 1 deletion _sources/chap01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
" print(\"Downloaded \" + str(local))\n",
" return filename\n",
"\n",
"download('https://raw.githubusercontent.com/AllenDowney/ThinkPython/v3/thinkpython.py')\n",
"download('https://github.com/AllenDowney/ThinkPython/raw/v3/thinkpython.py');\n",
"\n",
"import thinkpython"
]
Expand Down Expand Up @@ -1437,6 +1437,19 @@
"## Exercises"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "06d3e72c",
"metadata": {},
"outputs": [],
"source": [
"# This cell tells Jupyter to provide detailed debugging information\n",
"# when a runtime error occurs. Run it before working on the exercises.\n",
"\n",
"%xmode Verbose"
]
},
{
"cell_type": "markdown",
"id": "23adf208",
Expand All @@ -1458,6 +1471,8 @@
"id": "ebf1a451",
"metadata": {},
"source": [
"Here are some topics you could ask a virtual assistant about:\n",
"\n",
"* Earlier I mentioned bitwise operators but I didn't explain why the value of `7 ^ 2` is 5. Try asking \"What are the bitwise operators in Python?\" or \"What is the value of `7 XOR 2`?\"\n",
"\n",
"* I also mentioned the order of operations. For more details, ask \"What is the order of operations in Python?\"\n",
Expand Down
180 changes: 89 additions & 91 deletions _sources/chap02.ipynb

Large diffs are not rendered by default.

40 changes: 21 additions & 19 deletions _sources/chap03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"cell_type": "code",
"execution_count": null,
"id": "103cbe3c",
"metadata": {},
"metadata": {
"tags": [
"remove-cell"
]
},
"outputs": [],
"source": [
"from os.path import basename, exists\n",
Expand All @@ -19,24 +23,9 @@
" return filename\n",
"\n",
"download('https://github.com/AllenDowney/ThinkPython/raw/v3/thinkpython.py');\n",
"download('https://github.com/AllenDowney/ThinkPython/raw/v3/diagram.py');"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "d4b444ba",
"metadata": {
"tags": [
"remove-cell"
]
},
"outputs": [],
"source": [
"import thinkpython\n",
"download('https://github.com/AllenDowney/ThinkPython/raw/v3/diagram.py');\n",
"\n",
"%load_ext autoreload\n",
"%autoreload 2"
"import thinkpython"
]
},
{
Expand Down Expand Up @@ -978,12 +967,25 @@
"## Exercises"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3f77b428",
"metadata": {},
"outputs": [],
"source": [
"# This cell tells Jupyter to provide detailed debugging information\n",
"# when a runtime error occurs. Run it before working on the exercises.\n",
"\n",
"%xmode Verbose"
]
},
{
"cell_type": "markdown",
"id": "82951027",
"metadata": {},
"source": [
"### Ask an assistant\n",
"### Ask a virtual assistant\n",
"\n",
"The statements in a function or a `for` loop are indented by four spaces, by convention.\n",
"But not everyone agrees with that convention.\n",
Expand Down
37 changes: 32 additions & 5 deletions _sources/chap04.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
" print(\"Downloaded \" + str(local))\n",
" return filename\n",
"\n",
"download('https://raw.githubusercontent.com/AllenDowney/ThinkPython/v3/thinkpython.py')\n",
"download('https://raw.githubusercontent.com/AllenDowney/ThinkPython/v3/diagram.py')\n",
"download('https://github.com/AllenDowney/ThinkPython/raw/v3/thinkpython.py');\n",
"download('https://github.com/AllenDowney/ThinkPython/raw/v3/diagram.py');\n",
"download('https://github.com/ramalho/jupyturtle/releases/download/2024-03/jupyturtle.py');"
]
},
Expand Down Expand Up @@ -1427,11 +1427,38 @@
},
{
"cell_type": "markdown",
"id": "50ed5c38",
"id": "0bfe2e19",
"metadata": {},
"source": [
"## Exercises\n",
"## Exercises"
]
},
{
"cell_type": "code",
"execution_count": 47,
"id": "9f94061e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Exception reporting mode: Verbose\n"
]
}
],
"source": [
"# This cell tells Jupyter to provide detailed debugging information\n",
"# when a runtime error occurs. Run it before working on the exercises.\n",
"\n",
"%xmode Verbose"
]
},
{
"cell_type": "markdown",
"id": "50ed5c38",
"metadata": {},
"source": [
"For the exercises below, there are a few more turtle functions you might want to use.\n",
"\n",
"* `penup` lifts the turtle's imaginary pen so it doesn't leave a trail when it moves.\n",
Expand Down Expand Up @@ -3945,7 +3972,7 @@
"id": "9d9f35d1",
"metadata": {},
"source": [
"### Ask an assistant\n",
"### Ask a virtual assistant\n",
"\n",
"There are several modules like `jupyturtle` in Python, and the one we used in this chapter has been customized for this book.\n",
"So if you ask a virtual assistant for help, it won't know which module to use.\n",
Expand Down
Loading

0 comments on commit 765e526

Please sign in to comment.