error in using doc string example usage as given in book
<p>I am learning python by the examples given in a book here is an example which I typed on terminal </p>

<pre><code>user@ubuntu:~$ python
Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; def square(x):
...     'Calculates the square of the number x'
...      return x*x  
</code></pre>

<p>upon pressing enter above code gives following error </p>

<pre><code>  File "&lt;stdin&gt;", line 3
    return x*x
    ^
IndentationError: unexpected indent  
</code></pre>

<p>I had typed this on the terminal I am not sure what more needs to be indented, 
basically the example given in the books deals with use of doc strings in python i.e. the strings that explain the functions what they do so if the above would have worked my next step would be to verify if the doc string could be accessed as given in book</p>

<pre><code>&gt;&gt;&gt; square.__doc__
'Calculates the square of the number x.'
</code></pre>

<p>or verifying the use of help function on interactive interpretor</p>

<pre><code>&gt;&gt;&gt; help(square)
Help on function square in module __main__:
</code></pre>

<p>I am practicing this in an interactive interpreter (terminal) , let me know what is the mistake I did above?</p>
