Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDowney committed May 8, 2024
1 parent d7fa947 commit 03d8bcc
Show file tree
Hide file tree
Showing 44 changed files with 1,162 additions and 380 deletions.
9 changes: 6 additions & 3 deletions _sources/chap01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
]
},
"source": [
"(chapter_programming)=\n",
"(chapter_programming)=\n",
"# Programming as a way of thinking\n",
"\n",
Expand Down Expand Up @@ -1442,7 +1441,11 @@
"cell_type": "code",
"execution_count": null,
"id": "06d3e72c",
"metadata": {},
"metadata": {
"tags": [
"remove-print"
]
},
"outputs": [],
"source": [
"# This cell tells Jupyter to provide detailed debugging information\n",
Expand Down Expand Up @@ -1783,7 +1786,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down
8 changes: 6 additions & 2 deletions _sources/chap02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,11 @@
"cell_type": "code",
"execution_count": null,
"id": "c9e6cab4",
"metadata": {},
"metadata": {
"tags": [
"remove-print"
]
},
"outputs": [],
"source": [
"# This cell tells Jupyter to provide detailed debugging information\n",
Expand Down Expand Up @@ -1579,7 +1583,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.14"
},
"vscode": {
"interpreter": {
Expand Down
38 changes: 12 additions & 26 deletions _sources/chap03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@
"id": "1fe8ee82",
"metadata": {
"tags": [
"remove-cell"
"remove-print"
]
},
"outputs": [
Expand All @@ -824,9 +824,10 @@
}
],
"source": [
"# This cell tells Jupyter to display error messages with tracebacks\n",
"# This cell tells Jupyter to provide detailed debugging information\n",
"# when a runtime error occurs, including a traceback.\n",
"\n",
"%xmode Plain"
"%xmode Verbose"
]
},
{
Expand Down Expand Up @@ -971,7 +972,11 @@
"cell_type": "code",
"execution_count": null,
"id": "3f77b428",
"metadata": {},
"metadata": {
"tags": [
"remove-print"
]
},
"outputs": [],
"source": [
"# This cell tells Jupyter to provide detailed debugging information\n",
Expand Down Expand Up @@ -1078,16 +1083,7 @@
"id": "7aa95014",
"metadata": {},
"outputs": [],
"source": [
"def triangle(string, height):\n",
" \"\"\"Make a triangle shape by printing a string repeatedly.\n",
" \n",
" string: characters to be repeated\n",
" height: number of lines in the triangle\n",
" \"\"\"\n",
" for i in range(height+1):\n",
" print(string * i)"
]
"source": []
},
{
"cell_type": "code",
Expand Down Expand Up @@ -1130,17 +1126,7 @@
"id": "bcedab79",
"metadata": {},
"outputs": [],
"source": [
"def rectangle(string, width, height):\n",
" \"\"\"Make a rectangle by printing a string repeatedly.\n",
" \n",
" string: characters to be repeated\n",
" width: number of repetitions on each line\n",
" height: number of lines\n",
" \"\"\"\n",
" for i in range(height+1):\n",
" print(string * width)"
]
"source": []
},
{
"cell_type": "code",
Expand Down Expand Up @@ -1785,7 +1771,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down
11 changes: 6 additions & 5 deletions _sources/chap04.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
]
},
"source": [
"(section_turtle_module)=\n",
"(section_turtle_module)=\n",
"## The jupyturtle module\n",
"\n",
Expand Down Expand Up @@ -390,7 +389,6 @@
]
},
"source": [
"(section_encapsulation)=\n",
"(section_encapsulation)=\n",
"## Encapsulation and generalization\n",
"\n",
Expand Down Expand Up @@ -1320,7 +1318,6 @@
]
},
"source": [
"(section_docstring)=\n",
"(section_docstring)=\n",
"## Docstrings\n",
"\n",
Expand Down Expand Up @@ -1440,7 +1437,11 @@
"cell_type": "code",
"execution_count": 47,
"id": "9f94061e",
"metadata": {},
"metadata": {
"tags": [
"remove-print"
]
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -7903,7 +7904,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down
8 changes: 6 additions & 2 deletions _sources/chap05.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,11 @@
"cell_type": "code",
"execution_count": null,
"id": "66aae3cb",
"metadata": {},
"metadata": {
"tags": [
"remove-print"
]
},
"outputs": [],
"source": [
"# This cell tells Jupyter to provide detailed debugging information\n",
Expand Down Expand Up @@ -3393,7 +3397,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down
11 changes: 6 additions & 5 deletions _sources/chap06.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,6 @@
]
},
"source": [
"(section_incremental)=\n",
"(section_incremental)=\n",
"## Incremental development\n",
"\n",
Expand Down Expand Up @@ -1356,7 +1355,6 @@
]
},
"source": [
"(section_fibonacci)=\n",
"(section_fibonacci)=\n",
"## Fibonacci\n",
"\n",
Expand Down Expand Up @@ -1594,7 +1592,6 @@
]
},
"source": [
"(section_debugging_factorial)=\n",
"(section_debugging_factorial)=\n",
"## Debugging\n",
"\n",
Expand Down Expand Up @@ -1734,7 +1731,11 @@
"cell_type": "code",
"execution_count": 142,
"id": "e0f15ca4",
"metadata": {},
"metadata": {
"tags": [
"remove-print"
]
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -2321,7 +2322,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down
9 changes: 6 additions & 3 deletions _sources/chap07.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
]
},
"source": [
"(chapter_search)=\n",
"(chapter_search)=\n",
"# Iteration and Search\n",
"\n",
Expand Down Expand Up @@ -115150,7 +115149,11 @@
"cell_type": "code",
"execution_count": null,
"id": "bc58db59",
"metadata": {},
"metadata": {
"tags": [
"remove-print"
]
},
"outputs": [],
"source": [
"# This cell tells Jupyter to provide detailed debugging information\n",
Expand Down Expand Up @@ -115821,7 +115824,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down
25 changes: 18 additions & 7 deletions _sources/chap08.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"id": "aec20975",
"metadata": {
"tags": [
"raises-excpetion"
"raises-exception"
]
},
"outputs": [
Expand Down Expand Up @@ -263,7 +263,11 @@
"cell_type": "code",
"execution_count": 64,
"id": "3ccb4a64",
"metadata": {},
"metadata": {
"tags": [
"raises-exception"
]
},
"outputs": [
{
"ename": "IndexError",
Expand Down Expand Up @@ -595,7 +599,11 @@
"cell_type": "code",
"execution_count": 75,
"id": "69ccd380",
"metadata": {},
"metadata": {
"tags": [
"raises-exception"
]
},
"outputs": [
{
"ename": "TypeError",
Expand Down Expand Up @@ -847,7 +855,6 @@
]
},
"source": [
"(section_writing_files)=\n",
"(section_writing_files)=\n",
"## Writing files\n",
"\n",
Expand Down Expand Up @@ -7049,7 +7056,11 @@
"cell_type": "code",
"execution_count": null,
"id": "18bced21",
"metadata": {},
"metadata": {
"tags": [
"remove-print"
]
},
"outputs": [],
"source": [
"# This cell tells Jupyter to provide detailed debugging information\n",
Expand Down Expand Up @@ -7450,7 +7461,7 @@
"id": "c1d0f892",
"metadata": {},
"source": [
"## Exercise\n",
"### Exercise\n",
"\n",
"*The Count of Monte Cristo* is a novel by Alexandre Dumas that is considered a classic.\n",
"Nevertheless, in the introduction of an English translation of the book, the writer Umberto Eco confesses that he found the book to be \"one of the most badly written novels of all time\".\n",
Expand Down Expand Up @@ -7826,7 +7837,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 03d8bcc

Please sign in to comment.