15 lines
284 B
Python
15 lines
284 B
Python
|
import math
|
||
|
from Shape import Shape
|
||
|
|
||
|
|
||
|
class Circle(Shape):
|
||
|
def __int__(self, radius, color):
|
||
|
self.radius = radius
|
||
|
self.color = color
|
||
|
|
||
|
def area(self):
|
||
|
return math.pi * (self.radius ** 2)
|
||
|
|
||
|
def perimetr(self):
|
||
|
return 2 * math.pi * self.radius
|