266

 Code:
function a($)
    $a=($=)*4,3,3,three,four,five,six,seven,eight,nine,ten,eleven,twelve,8,8,7,7,9,8,8,0,0,6,6,5,5,5,7,6,6
    if b>$
        $a=($a[right($,1+($<20))]^)+$a[20+$/10]
    else
        $a=$a[($^)-((instr($,y)^$)>9)]
    endif
    if $=$a
        $a=""+$+" is magic."
    else
        $a=""+$+" is "+$a+". "+a($a)
endfunction


@Shane: as this is Jooels Baby, it's up to him explaining whats going on..

Only so much:
this part here is very clever, and I don't know if it was used as such before:

($a[right($,1+($<20))]^)

If the array element is of type String, it returns its length or, if it is of type integer, it returns the value of the element..
_________________________