request for help

Stefan Holdermans stefan at
Mon Feb 18 20:59:20 CET 2013


> i saved the above program from python shell into a file as "" . 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.



More information about the Python-list mailing list