![]() |
|
[Python] Decimal places - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Decimal places (/showthread.php?tid=5712417) |
Decimal places - Will Patterson - Sep 7, 2017 My teacher has asked me to "Display all amounts in currency format with the $ sign right up against the first digit and two decimal places." The code is: Code # program2_3.pyHow would I do what he asked? * - koolkid - Sep 7, 2017 like that PHP Code * - HFDone - Sep 7, 2017 https://docs.python.org/3/library/string.html#format-examples |