You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Status/Day_13.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,4 +116,27 @@ print aSquare.area()
116
116
----------------
117
117
**My Solution: Python 3**
118
118
```
119
+
class Shape():
120
+
def __init__(self):
121
+
pass
122
+
123
+
def area(self):
124
+
return 0
125
+
126
+
class Square(Shape):
127
+
def __init__(self,length = 0):
128
+
Shape.__init__(self)
129
+
self.length = length
130
+
131
+
def area(self):
132
+
return self.length*self.length
133
+
134
+
Asqr = Square(5)
135
+
print(Asqr.area()) # prints 25 as given argument
136
+
137
+
print(Square().area()) # prints zero as default area
119
138
```
139
+
140
+
## Conclusion
141
+
142
+
***Well It seems that the above problems are very much focused on basic concpets and implimantation of object oriented programming.As the concepts are not about to solve any functional problem rather design the structure , so both codes are very much similar in there implimantation part.***
0 commit comments