File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 555
555
"cell_type" : " markdown" ,
556
556
"metadata" : {},
557
557
"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 :"
559
559
]
560
560
},
561
561
{
571
571
" # (3) the method .format()\n " ,
572
572
" print(\" The number is {:.2f}\" .format(number))\n " ,
573
573
" # (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}\"\"\" )"
577
575
]
576
+ },
577
+ {
578
+ "cell_type" : " code" ,
579
+ "execution_count" : null ,
580
+ "metadata" : {},
581
+ "outputs" : [],
582
+ "source" : []
578
583
}
579
584
],
580
585
"metadata" : {
You can’t perform that action at this time.
0 commit comments