User Tools

Site Tools


task_boiler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
task_boiler [2023/02/13 23:53] rajutask_boiler [2024/01/23 22:55] (current) 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 | <code> 
-In [1]: 
-a = 10.30467 
- 
-In [2]: 
-type(round(a,2)) 
-Out[2]: 
-float 
- 
-In [3]: 
-type('{:.2f}'.format(a)) 
-Out[3]: 
-str 
-</code> || 
-| number of digits after the decimal point | varies | always two | 
- 
  
task_boiler.txt · Last modified: 2024/01/23 22:55 by raju