If you don't want to change your original function you can attach a decorator just above the function as shown ...
# intercept a wrong data type with a function decorator
"""decorator to check if a function argument is a number"""
def wrapper (arg):
if type(arg) in (int, float):
print "Error: need numeric value!"
"return the length of the hypotenuse of an isosceles triangle"
return (n*n + n*n)**0.5
print hypotenuse(3.7) # 5.23259018078
print hypotenuse(3) # 4.24264068712
print hypotenuse('a') # Error: need numeric value!
Might be a little advanced for a beginner, but then it is just one of the many advanced features Python has up its sleaves.