I have for instance this function I wrote and want to assure that the argument is a number when I call the function.
def hypotenuse(n):
"return the length of the hypotenuse of an isosceles triangle"
return (n*n + n*n)**0.5
sides = 3.7
print hypotenuse(sides)
Any ideas how to do this?