title: The code won't recognize my if statement (Python)
body: <p>The code wont recognize my if statement. When i run this code, i enter the following number: -10. However, this returns the else statement, when it should return the if statement. Any help with what i am doing wrong?</p>
  
  <pre><code>def distance_from_zero(d):
      if type(d)== int or type(d)==float:
          return abs(d)
      else:
          return "Not an integer or float!"
  x = raw_input("Enter number: ")        
  print distance_from_zero(d)
  </code></pre>