else & elif statements not working in Python
<p><strong>I'm new to Stack-exchange websites, so forgive me if I made a mistake.</strong> I'm a newbie and learning Python and currently learning Control Flow commands like 'if', 'else', etc. </p>

<p>The 'if' statement is working all fine but when I write 'else' or 'elif' commands, the interpreter gives me 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">'A Byte Of Python'</a></strong> . As you can see, <em>elif</em> and <em>else</em> are giving <em>Invalid Syntax</em>. <strong>Can anybody help?</strong></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 hope the syntax is right.</p>

<p>Thanks!</p>

<p>EDIT : The image<img src="http://i.stack.imgur.com/fQmiH.jpg" alt="enter image description here"> and yes, I'm getting the problem in both 'IDLE' and the interactive python.</p>
