round to 0 decimal python code example
Example 1: round off to two decimal places python
format(1.4000,'.2f') #to include zeroes while rounding to 2 decimals
Example 2: round down decimal python
import math
val = 3.14
math.floor(val) # rounds down --> 3
math.ceil(val) # rounds up val --> 4