hnc-eduard/HNS/Excercises/13082023 ДЗ по фигурам JSON/Circle.py

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