File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 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 {
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" : {
You can’t perform that action at this time.
0 commit comments