title: else & elif statements not working in Python
body: <p>I'm a newbie to Python and currently learning Control Flow commands like <code>if</code>, <code>else</code>, etc. </p>
  
  <p>The <code>if</code> statement is working all fine, but when I write <code>else</code> or <code>elif</code> commands, the interpreter gives me a syntax error. I'm using Python 3.2.1 and the problem is arising in both its native interpreter and IDLE.</p>
  
  <p>I'm following as it is given in the book <strong><a href="http://www.swaroopch.com/notes/Python" rel="noreferrer">'A Byte Of Python'</a></strong> . As you can see, <code>elif</code> and <code>else</code> are giving <em>Invalid Syntax</em>.</p>
  
  <pre><code>&gt;&gt; number=23
  &gt;&gt; guess = input('Enter a number : ')
  &gt;&gt; if guess == number:
  &gt;&gt;    print('Congratulations! You guessed it.')
  &gt;&gt; elif guess &lt; number:
     **( It is giving me 'Invalid Syntax')**
  &gt;&gt; else:
     **( It is also giving me 'Invalid syntax')**
  </code></pre>
  
  <p>Why is this happening? I'm getting the problem in both IDLE and the interactive python.  I hope the syntax is right.</p>
  
  <p><img src="https://i.stack.imgur.com/fQmiH.jpg" alt="enter image description here"></p>