title: Python if else condition error
body: <p>This is my code snippet, but it not execute the way that I want.The first if statement executes successfully if the input is a non-negative/character value, but if it is a negative value it ignores the elif statement. What's the issue.I'm using Python 2.6   </p>
  
  <pre><code>from math import sqrt
  import cmath
  y = raw_input("Enter your number:")
  if y.isdigit():
       x = int(sqrt(float(y)))
       print "Answer is", x
  elif y &lt; 0:
       print "Negative number", cmath.sqrt(y)
  else:
       print "Not a valid number"
  
  raw_input("Press &lt;enter&gt; to Exit")
  </code></pre>