Answers for "round off float to integer"

5

round off float to 2 decimal places in python

answer = str(round(answer, 2))
Posted by: Guest on May-24-2020
0

how to round floats

//In the %.1f the 1 represents tenths if we put 2f then it would be hundreths, 
//aka: (1.28) while the 1f would be (1.3).

perc = 1.28278268
VARIABLE = "%.1f" % perc
Posted by: Guest on March-31-2022

Code answers related to "round off float to integer"

Python Answers by Framework

Browse Popular Code Answers by Language