task_boiler
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
task_boiler [2022/08/11 22:00] – raju | task_boiler [2023/02/13 23:53] – raju | ||
---|---|---|---|
Line 3: | Line 3: | ||
Start the first heading with " | Start the first heading with " | ||
+ | |||
+ | ===== print hundredths ===== | ||
+ | Let's define hundredths as numbers with two decimal digits. This can be money amounts in dollars and cents. | ||
+ | |||
+ | tags | pennies, dollar-cent amounts | ||
+ | ==== write single numbers ==== | ||
+ | There are two possible ways | ||
+ | |||
+ | ^ ^ round ^ format ^ | ||
+ | | output type | float | string | | ||
+ | | output type | < | ||
+ | In [1]: | ||
+ | a = 10.30467 | ||
+ | |||
+ | In [2]: | ||
+ | type(round(a, | ||
+ | Out[2]: | ||
+ | float | ||
+ | |||
+ | In [3]: | ||
+ | type(' | ||
+ | Out[3]: | ||
+ | str | ||
+ | </ | ||
+ | | number of digits after the decimal point | varies | always two | | ||
+ | |||
task_boiler.txt · Last modified: 2024/01/23 22:55 by raju