Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39123 > unrolled thread

Re: request for help

Started byMatt Jones <matt.walker.jones@gmail.com>
First post2013-02-18 13:55 -0600
Last post2013-02-18 13:55 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: request for help Matt Jones <matt.walker.jones@gmail.com> - 2013-02-18 13:55 -0600

#39123 — Re: request for help

FromMatt Jones <matt.walker.jones@gmail.com>
Date2013-02-18 13:55 -0600
SubjectRe: request for help
Message-ID<mailman.1966.1361217337.2939.python-list@python.org>

[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
>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web