Rounding up to the next 100
Florian Diesch
diesch at spamfence.net
Thu Jan 21 16:51:33 EST 2010
noydb <jenn.duerr at gmail.com> writes:
> If one has a floating number as a string, is there a spiffy way to
> round that string-number UP to the nearest 100?
>
> XstrNmbr = 3579.127893 -- would want to round that to 3600.
math.ceil(3579.127893/100)*100
Florian
--
GUIs programmieren mit Python und Glade:
<http://www.florian-diesch.de/doc/python-und-glade/>
More information about the Python-list
mailing list