Here is my code which should allow me to input any number (or character for that matter) and return with the absolute value of that number. If it isn’t a number it should return with “nope”. Unfortunately, when I run the code it only returns with “nope” even when I put in a number. Anyone see what it wrong with this?

n= raw_input(“Enter a number:”)

def distance_from_zero(n):

if type(n)== int or type(n)== float:

return abs(n)

else:

return “Nope”

print distance_from_zero(n)