1>>> x = 13.949999999999999999
2>>> x
313.95
4>>> g = float("{0:.2f}".format(x))
5>>> g
613.95
7>>> x == g
8True
9>>> h = round(x, 2)
10>>> h
1113.95
12>>> x == h
13True
1import math
2
3val = 3.14
4math.floor(val) # rounds down --> 3
5math.ceil(val) # rounds up val --> 4