[Tutor] floats

Michael bridges micha_el2003 at yahoo.com
Tue Jun 7 04:43:47 CEST 2011


i saw it somewhere, but where?

i want to 10 / 1000 and get 0.01 not 0
if 1000 is made 1000.00 then 0.01 is printed
but that gives 500 / 1000.00 is 0.5 not 0.50

i might be thinking C# not python.

can someone till me how to get a two decimal precision every time?



More information about the Tutor mailing list