title: Python syntax error "def"
body: <p>I am trying to compile this piece of Python code- </p>
  
  <pre><code>def isPrime ( n ):
      if n &lt; 2 :
          return false
      for x in range(2,n):
          if (n % x)==0:
              return false
      return true
  
  def nthPrime ( n ):
      y = 0
      z = 1
      while y&lt; n:
          z+=1
          if isPrime( z ):
              y+=1
      return z 
  </code></pre>
  
  <p>But I am having this error in line 9 on "def"</p>
  
  <pre><code>SyntaxError: invalid syntax
  </code></pre>