Created
April 3, 2020 16:20
-
-
Save edenau/8cf6006a3e479e0bc2bd594f7fe3044d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Shape: | |
pass | |
class Rectangle(Shape): | |
def __init__(self, length, width): | |
self.length = length | |
self.width = width | |
self.area = length * width | |
def get_area(self): | |
return self.length * self.width | |
class Square(Rectangle): | |
def __init__(self,length): | |
Rectangle.__init__(self,length,length) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment