Skip to content

Commit 5cc4ef2

Browse files
committed
correct
1 parent f00b8f1 commit 5cc4ef2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

assets/notebooks/27_strings_overview.ipynb

+9-4
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@
555555
"cell_type": "markdown",
556556
"metadata": {},
557557
"source": [
558-
"- Print `The number is 1.23` (only the first two decimals) using the methods above and (5) percent formatting:"
558+
"- Print `The number is 1.23` (only the first two decimals) using the four methods:"
559559
]
560560
},
561561
{
@@ -571,10 +571,15 @@
571571
"# (3) the method .format()\n",
572572
"print(\"The number is {:.2f}\".format(number))\n",
573573
"# (4) f-strings\n",
574-
"print(f\"\"\"The number is {number:.2f}\"\"\")\n",
575-
"# (5) percent formatting\n",
576-
"print(\"The number is %.2f\" % number)"
574+
"print(f\"\"\"The number is {number:.2f}\"\"\")"
577575
]
576+
},
577+
{
578+
"cell_type": "code",
579+
"execution_count": null,
580+
"metadata": {},
581+
"outputs": [],
582+
"source": []
578583
}
579584
],
580585
"metadata": {

0 commit comments

Comments
 (0)