On 2006-03-23, Michael Yanowitz <[EMAIL PROTECTED]> wrote:

> Sorry, got it backwards:
> def printDecimal(number):
>     if (number >= 0):
>         print number - int(number)
>     else:
>         print int(number) - number

Still top posted and still doesn't work:

>>> def printDecimal(number):
...     if (number >= 0):
...           print number - int(number)
...     else:
...           print int(number) - number
... 
>>> printDecimal(0.666)
0.666
>>> printDecimal(-0.666)
0.666
>>> 

-- 
Grant Edwards                   grante             Yow!  How many retired
                                  at               bricklayers from FLORIDA
                               visi.com            are out purchasing PENCIL
                                                   SHARPENERS right NOW??
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to