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


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

Re: request for help

Started byStefan Holdermans <stefan@vectorfabrics.com>
First post2013-02-18 20:59 +0100
Last post2013-02-18 20:59 +0100
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 Stefan Holdermans <stefan@vectorfabrics.com> - 2013-02-18 20:59 +0100

#39124 — Re: request for help

FromStefan Holdermans <stefan@vectorfabrics.com>
Date2013-02-18 20:59 +0100
SubjectRe: request for help
Message-ID<mailman.1967.1361217565.2939.python-list@python.org>
Leonardi,

> i saved the above program from python shell into a file as "circle.py" . when i type "import circle" i get  error..


Next time, please mention what kind of error you're getting.

Was it an indentation error? Because, as you pasted it, your code would lead to one.

If I fix the indentation, as in

  import math

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

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

it works fine for me.

HTH,

  Stefan

[toc] | [standalone]


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


csiph-web