14 lines
278 B
Python
14 lines
278 B
Python
|
from Shape import Shape
|
||
|
|
||
|
|
||
|
class Rectangle(Shape):
|
||
|
def __init__(self, width, height):
|
||
|
self.width = width
|
||
|
self.height = height
|
||
|
|
||
|
def perimeter(self):
|
||
|
return 2 * (self.width + self.height)
|
||
|
|
||
|
def area(self):
|
||
|
return self.width * self.height
|