On Saturday, June 14, 2014 11:17:50 AM UTC-7, [email protected] wrote:
> I am new to python, pls help me to resolve the below error
>
>
>
>
>
> >>> def fib(n):
>
> ... """Print a Fibonacci series up to n."""
>
> File "<stdin>", line 2
>
> """Print a Fibonacci series up to n."""
>
> ^
>
> IndentationError: expected an indented block
Python uses indentation to delineate blocks of code, instead of (for example)
curly brackets. Add some white space (the convention is four characters) after
at least the first line that ends with a colon, and then indent every line that
is in the code block accordingly. Like this:
def fib(n):
"""Print a Fibonacci series up to n."""
do_something()
do_something_else()
--
https://mail.python.org/mailman/listinfo/python-list