round the digits of a float python code example
Example 1: how to round a float in python
round(number, ndigits)
Example 2: round down decimal python
import math
val = 3.14
math.floor(val) # rounds down --> 3
math.ceil(val) # rounds up val --> 4