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
1int x = 6.3456824221
2
3#round(number_to_roundoff, round_off_till)
4#round_off_till is optional
5
6print(round(x)) #output: 6
7print(round(x, 3)) #output: 6.346
8print(round(x, 1) #output: 6.3
1# round(number, decimals).
2# second parameter is optional, defaults to 0.
3
4num1 = 1.56234
5num2 = 1.434
6
7print(round(num1)) # output: 2
8print(round(num2)) # output: 1
9print(round(num1, 3)) # output: 1.562
10print(round(num2, 1) # output: 6.3