Rounding to the nearest 5

todpose at hotmail.com todpose at hotmail.com
Thu Jan 29 19:06:09 EST 2009


How can you make python round numbers to the nearest 5:
 
Example:
 
3 => 0
8 => 10
23.2 => 20
36 => 35
51.5 => 50
 
 
Thanks!
_________________________________________________________________
Twice the fun—Share photos while you chat with Windows Live Messenger.
http://www.microsoft.com/windows/windowslive/messenger.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090129/68216013/attachment.html>


More information about the Python-list mailing list