Get your own Python server Result Size: 625 x 565
x
 
# Import math Library
import math
# Check whether some values are NaN
print (math.isnan (56))
print (math.isnan (-45.34))
print (math.isnan (+45.34))
print (math.isnan (math.inf))
print (math.isnan (float("nan")))
print (math.isnan (float("inf")))
print (math.isnan (float("-inf")))
print (math.isnan (math.nan))
False
False
False
False
True
False
False
True