todp...@hotmail.com wrote: > How can you make python round numbers to the nearest 5: > > Example: > > 3 => 0 > 8 => 10 > 23.2 => 20 > 36 => 35 > 51.5 => 50
round(n,-1) rounds to the nearest 10, so round(n*2,-1)/2 will round to the nearest five. Gary Herron > > > Thanks! > > ------------------------------------------------------------------------ > Twice the fun— Share photos while you chat with Windows Live > Messenger. <http://www.microsoft.com/windows/windowslive/messenger.aspx> > ------------------------------------------------------------------------ > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list