How can i get exactly 2 decimal position in python -


while writing code came around difficult situation, have float 2.467 need 2.4 not 2.5

when use roud() function gives 2.5

please me code how 2.4 2.47

>>> int(2.467 * 10) / 10.0 2.4 >>> int(2.47 * 10) / 10.0 2.4 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -