Created
December 28, 2018 04:13
-
-
Save rdcoder33/5211ed4c2904d18737a57ea22f298bc8 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: | |
def area(self): | |
pass | |
def perimeter(self): | |
pass | |
class Square(Shape): | |
def __init__(self, side): | |
self.side = side | |
def area(self): | |
return self.side ** 2 | |
shape_obj = Shape() | |
square_obj = Square(5) | |
print(square_obj.area()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment