Skip to content

Commit

Permalink
Updating the notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDowney committed Oct 7, 2024
1 parent a43e265 commit dba88b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion chapters/chap00.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
"version": "3.10.11"
}
},
"nbformat": 4,
Expand Down
14 changes: 7 additions & 7 deletions chapters/chap01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@
"source": [
"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",
"\n",
"* **integers**, which represent whole numbers, and \n",
"* **integers**, which represent numbers with no fractional or decimal part, and \n",
"\n",
"* **floating-point numbers**, which represent numbers with a decimal point.\n",
"* **floating-point numbers**, which represent integers and numbers with a decimal point.\n",
"\n",
"If you add, subtract, or multiply two integers, the result is an integer.\n",
"But if you divide two integers, the result is a floating-point number.\n",
Expand Down Expand Up @@ -333,7 +333,7 @@
"## Arithmetic functions\n",
"\n",
"In addition to the arithmetic operators, Python provides a few **functions** that work with numbers.\n",
"For example, the `round` function takes a floating-point number and rounds it off to the nearest whole number."
"For example, the `round` function takes a floating-point number and rounds it off to the nearest integer."
]
},
{
Expand Down Expand Up @@ -581,7 +581,7 @@
"source": [
"The other arithmetic operators don't work with strings.\n",
"\n",
"Python provides a function called `len` that computes the length of a string.`"
"Python provides a function called `len` that computes the length of a string."
]
},
{
Expand Down Expand Up @@ -961,10 +961,10 @@
"A symbol, like `+` and `*`, that denotes an arithmetic operation like addition or multiplication.\n",
"\n",
"**integer:**\n",
"A type that represents whole numbers.\n",
"A type that represents numbers with no fractional or decimal part.\n",
"\n",
"**floating-point:**\n",
"A type that represents numbers with fractional parts.\n",
"A type that represents integers and numbers with decimal parts.\n",
"\n",
"**integer division:**\n",
"An operator, `//`, that divides two numbers and rounds down to an integer.\n",
Expand Down Expand Up @@ -1063,7 +1063,7 @@
"\n",
"* I also mentioned the order of operations. For more details, ask \"What is the order of operations in Python?\"\n",
"\n",
"* 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",
"* 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",
"\n",
"* There's one more arithmetic operator I didn't mention; try asking \"What is the modulus operator in Python?\""
]
Expand Down

0 comments on commit dba88b3

Please sign in to comment.