request for help

Matt Jones matt.walker.jones at gmail.com
Mon Feb 18 20:55:13 CET 2013


Is this exactly how it shows in your shell?  If so, it seems you need to
indent your methods.

#****************************************
import math

def area(radius):
    return math.pi * radius**2

def circumference(radius):
    return 2 * math.pi * radius
#****************************************

*Matt Jones*


On Mon, Feb 18, 2013 at 1:42 PM, leonardo selmi <l.selmi at icloud.com> wrote:

> pls i need help:
>
> i have copied the following from a book and tried to make it work:
>
> import math
>
> def area(radius):
> return math.pi * radius**2
>
> def circumference(radius):
> return 2 * math.pi * radius
>
> i saved the above program from python shell into a file as "circle.py" .
> when i type "import circle" i get  error..
>
>
> kind regards
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130218/13ff2e90/attachment.html>


More information about the Python-list mailing list