On Apr 11, 4:19 pm, [EMAIL PROTECTED] wrote:
> couldn't you just do.
>
> #untested
> new_round(n):
>   answer = round(n)
>   # is answer now odd
>   if answer % 2:
>     return answer - 1
>   else:
>     return answer

It fails for negative numbers: For -2.5 it gives -4.0 as answer
whereas I expect -2.0
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to