# L-26 MCS 260 Fri 26 Oct 2007 : classcircle from classpoint import * class Circle(Point): "defines a circle derived from point" def __init__(self,a=0,b=0,r=0): "the center is (a,b), radius = r" Point.__init__(self,a,b) self.r = r def area(self): "returns the area of the circle" from math import pi return pi*self.r**2 def __str__(self): "returns string representation of a circle" s = 'center : ' + Point.__str__(self) + '\n' s += 'radius : ' + '%.4e' % self.r return s