Skip to content

Commit

Permalink
Updating the notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDowney committed Nov 8, 2024
1 parent f9adda9 commit 275074d
Showing 1 changed file with 12 additions and 46 deletions.
58 changes: 12 additions & 46 deletions chapters/chap04.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1080,32 +1080,15 @@
},
{
"cell_type": "markdown",
"id": "3a56643b",
"id": "991ab59d",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"Write an appropriately general set of functions that can draw shapes like this."
]
},
{
"cell_type": "code",
"execution_count": 57,
"id": "be86eb71",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from IPython.display import SVG, display\n",
"display(SVG(url='https://github.com/AllenDowney/ThinkPython/raw/v3/jupyturtle_pie.svg'))"
]
},
{
"cell_type": "markdown",
"id": "feae252c",
"metadata": {},
"source": [
"Write an appropriately general set of functions that can draw shapes like this.\n",
"\n",
"![](https://github.com/AllenDowney/ThinkPython/raw/v3/jupyturtle_pie.png)\n",
"\n",
"Hint: Write a function called `triangle` that draws one triangular segment, and then a function called `draw_pie` that uses `triangle`."
]
},
Expand Down Expand Up @@ -1142,7 +1125,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f8cbf549",
"id": "c519ca39",
"metadata": {
"tags": []
},
Expand Down Expand Up @@ -1173,32 +1156,15 @@
},
{
"cell_type": "markdown",
"id": "e35f613a",
"id": "9c78b76f",
"metadata": {},
"source": [
"### Exercise\n",
"\n",
"Write an appropriately general set of functions that can draw flowers like this."
]
},
{
"cell_type": "code",
"execution_count": 58,
"id": "c8095531",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from IPython.display import SVG, display\n",
"display(SVG(url='https://github.com/AllenDowney/ThinkPython/raw/v3/jupyturtle_flower.svg'))"
]
},
{
"cell_type": "markdown",
"id": "7c665dd1",
"metadata": {},
"source": [
"Write an appropriately general set of functions that can draw flowers like this.\n",
"\n",
"![](https://github.com/AllenDowney/ThinkPython/raw/v3/jupyturtle_flower.png)\n",
"\n",
"Hint: Use `arc` to write a function called `petal` that draws one flower petal."
]
},
Expand Down Expand Up @@ -1240,7 +1206,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8e92df6f",
"id": "04193da5",
"metadata": {
"tags": []
},
Expand Down

0 comments on commit 275074d

Please sign in to comment.