The checker can evaluate your answer to True if it has nan (not a number). Always print your answer to make sure you got it right. In my case, I got this (I know most people won't make the mistake I did, but better to be safe):
Second Test case
asked 20 Mar '12, 12:02
There is a small change to the test routine that will catch NaN input. Inf input would already be handled correctly. The original routine is:
Since (nan < x) is always false, as is (nan > x) and (nan == x), then switching the logic around will catch NaNs.