Skip to content

Commit 76a6c72

Browse files
committed
Updating the blank notebooks
1 parent 8eddbf6 commit 76a6c72

20 files changed

+587
-259
lines changed

blank/chap00.ipynb

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,22 @@
217217
"metadata": {},
218218
"outputs": [],
219219
"source": []
220+
},
221+
{
222+
"cell_type": "markdown",
223+
"id": "a7f4edf8",
224+
"metadata": {
225+
"tags": []
226+
},
227+
"source": [
228+
"[Think Python: 3rd Edition](https://allendowney.github.io/ThinkPython/index.html)\n",
229+
"\n",
230+
"Copyright 2024 [Allen B. Downey](https://allendowney.com)\n",
231+
"\n",
232+
"Code license: [MIT License](https://mit-license.org/)\n",
233+
"\n",
234+
"Text license: [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/)"
235+
]
220236
}
221237
],
222238
"metadata": {
@@ -235,7 +251,7 @@
235251
"name": "python",
236252
"nbconvert_exporter": "python",
237253
"pygments_lexer": "ipython3",
238-
"version": "3.10.14"
254+
"version": "3.10.11"
239255
}
240256
},
241257
"nbformat": 4,

blank/chap01.ipynb

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@
161161
"source": [
162162
"Notice that the result of the division is `42.0` rather than `42`. That's because there are two types of numbers in Python: \n",
163163
"\n",
164-
"* **integers**, which represent whole numbers, and \n",
164+
"* **integers**, which represent numbers with no fractional or decimal part, and \n",
165165
"\n",
166-
"* **floating-point numbers**, which represent numbers with a decimal point.\n",
166+
"* **floating-point numbers**, which represent integers and numbers with a decimal point.\n",
167167
"\n",
168168
"If you add, subtract, or multiply two integers, the result is an integer.\n",
169169
"But if you divide two integers, the result is a floating-point number.\n",
@@ -311,7 +311,7 @@
311311
"## Arithmetic functions\n",
312312
"\n",
313313
"In addition to the arithmetic operators, Python provides a few **functions** that work with numbers.\n",
314-
"For example, the `round` function takes a floating-point number and rounds it off to the nearest whole number."
314+
"For example, the `round` function takes a floating-point number and rounds it off to the nearest integer."
315315
]
316316
},
317317
{
@@ -533,7 +533,7 @@
533533
"source": [
534534
"The other arithmetic operators don't work with strings.\n",
535535
"\n",
536-
"Python provides a function called `len` that computes the length of a string.`"
536+
"Python provides a function called `len` that computes the length of a string."
537537
]
538538
},
539539
{
@@ -877,10 +877,10 @@
877877
"A symbol, like `+` and `*`, that denotes an arithmetic operation like addition or multiplication.\n",
878878
"\n",
879879
"**integer:**\n",
880-
"A type that represents whole numbers.\n",
880+
"A type that represents numbers with no fractional or decimal part.\n",
881881
"\n",
882882
"**floating-point:**\n",
883-
"A type that represents numbers with fractional parts.\n",
883+
"A type that represents integers and numbers with decimal parts.\n",
884884
"\n",
885885
"**integer division:**\n",
886886
"An operator, `//`, that divides two numbers and rounds down to an integer.\n",
@@ -979,7 +979,7 @@
979979
"\n",
980980
"* I also mentioned the order of operations. For more details, ask \"What is the order of operations in Python?\"\n",
981981
"\n",
982-
"* The `round` function, which we used to round a floating-point number to the nearest whole number, can take a second argument. Try asking \"What are the arguments of the round function?\" or \"How do I round pi off to three decimal places?\"\n",
982+
"* The `round` function, which we used to round a floating-point number to the nearest integer, can take a second argument. Try asking \"What are the arguments of the round function?\" or \"How do I round pi off to three decimal places?\"\n",
983983
"\n",
984984
"* There's one more arithmetic operator I didn't mention; try asking \"What is the modulus operator in Python?\""
985985
]
@@ -1162,6 +1162,22 @@
11621162
"metadata": {},
11631163
"outputs": [],
11641164
"source": []
1165+
},
1166+
{
1167+
"cell_type": "markdown",
1168+
"id": "a7f4edf8",
1169+
"metadata": {
1170+
"tags": []
1171+
},
1172+
"source": [
1173+
"[Think Python: 3rd Edition](https://allendowney.github.io/ThinkPython/index.html)\n",
1174+
"\n",
1175+
"Copyright 2024 [Allen B. Downey](https://allendowney.com)\n",
1176+
"\n",
1177+
"Code license: [MIT License](https://mit-license.org/)\n",
1178+
"\n",
1179+
"Text license: [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/)"
1180+
]
11651181
}
11661182
],
11671183
"metadata": {

blank/chap02.ipynb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,22 @@
10961096
"metadata": {},
10971097
"outputs": [],
10981098
"source": []
1099+
},
1100+
{
1101+
"cell_type": "markdown",
1102+
"id": "a7f4edf8",
1103+
"metadata": {
1104+
"tags": []
1105+
},
1106+
"source": [
1107+
"[Think Python: 3rd Edition](https://allendowney.github.io/ThinkPython/index.html)\n",
1108+
"\n",
1109+
"Copyright 2024 [Allen B. Downey](https://allendowney.com)\n",
1110+
"\n",
1111+
"Code license: [MIT License](https://mit-license.org/)\n",
1112+
"\n",
1113+
"Text license: [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/)"
1114+
]
10991115
}
11001116
],
11011117
"metadata": {

blank/chap03.ipynb

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,13 @@
509509
"frame2 = make_frame(d2, name='cat_twice', dy=-0.3, \n",
510510
" offsetx=0.03, loc='left')\n",
511511
"\n",
512-
"d3 = dict(s = line1+line2)\n",
512+
"d3 = dict(string=line1+line2)\n",
513513
"frame3 = make_frame(d3, name='print_twice', \n",
514-
" offsetx=-0.28, offsety=-0.3, loc='left')\n",
514+
" offsetx=0.04, offsety=-0.3, loc='left')\n",
515515
"\n",
516516
"d4 = {\"?\": line1+line2}\n",
517517
"frame4 = make_frame(d4, name='print', \n",
518-
" offsetx=-0.28, offsety=0, loc='left')\n",
518+
" offsetx=-0.22, offsety=0, loc='left')\n",
519519
"\n",
520520
"stack = Stack([frame1, frame2, frame3, frame4], dy=-0.8)"
521521
]
@@ -532,10 +532,10 @@
532532
"from diagram import diagram, adjust\n",
533533
"\n",
534534
"\n",
535-
"width, height, x, y = [3.8, 2.91, 1.15, 2.66]\n",
535+
"width, height, x, y = [3.77, 2.9, 1.1, 2.65]\n",
536536
"ax = diagram(width, height)\n",
537537
"bbox = stack.draw(ax, x, y)\n",
538-
"#adjust(x, y, bbox)"
538+
"# adjust(x, y, bbox)"
539539
]
540540
},
541541
{
@@ -955,6 +955,22 @@
955955
"metadata": {},
956956
"outputs": [],
957957
"source": []
958+
},
959+
{
960+
"cell_type": "markdown",
961+
"id": "a7f4edf8",
962+
"metadata": {
963+
"tags": []
964+
},
965+
"source": [
966+
"[Think Python: 3rd Edition](https://allendowney.github.io/ThinkPython/index.html)\n",
967+
"\n",
968+
"Copyright 2024 [Allen B. Downey](https://allendowney.com)\n",
969+
"\n",
970+
"Code license: [MIT License](https://mit-license.org/)\n",
971+
"\n",
972+
"Text license: [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/)"
973+
]
958974
}
959975
],
960976
"metadata": {

0 commit comments

Comments
 (0)