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

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -