15 lines
310 B
Python
15 lines
310 B
Python
|
from Shape import Shape
|
||
|
|
||
|
|
||
|
class Rectangle(Shape):
|
||
|
def __int__(self, width, height, color):
|
||
|
self.width = width
|
||
|
self.height = height
|
||
|
self.color = color
|
||
|
|
||
|
def area(self):
|
||
|
return self.width * self.height
|
||
|
|
||
|
def perimetr(self):
|
||
|
return (self.width + self.height) * 2
|