0
How to round off the values to 2 decimal? And what is the module name to import?
How to round off the values to 2 decimal? And what is the module name to import?
2 Réponses
+ 3
round(value,2)
where value is the decimal number.
It is a build in function so you don't need to import library.
+ 3
number=12.3456778
print("%.2f" % number)
output-
12.35