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? -

Error while updating a record in APEX screen -

c++ - In an add-in in Excel, written in C(++), how does one get the name of the function which called into the addin? -