用类编写圆

 设计一个Circle(圆)的类,包括圆心位置,半径,颜色等属性。编写构造方法和其余方法,计算周长,面积。请编写程序验证类的功能。python class Circle: def __init__(self,place,r,color): self.center=place self.r=r self.color=color def
相关文章
相关标签/搜索