Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39123
| References | <B7C01624-32AB-49CE-AAB4-064A5B8E54CB@icloud.com> |
|---|---|
| From | Matt Jones <matt.walker.jones@gmail.com> |
| Date | 2013-02-18 13:55 -0600 |
| Subject | Re: request for help |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1966.1361217337.2939.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
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@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
>
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: request for help Matt Jones <matt.walker.jones@gmail.com> - 2013-02-18 13:55 -0600
csiph-web