Uploaded OOP files
This commit is contained in:
9
Object Oriented Programming/shape_class.py
Normal file
9
Object Oriented Programming/shape_class.py
Normal file
@@ -0,0 +1,9 @@
|
||||
class Shape:
|
||||
def __init__(self, color=None):
|
||||
self.color = color
|
||||
|
||||
def get_color(self):
|
||||
return self.color
|
||||
|
||||
def __str__(self):
|
||||
return self.get_color() + ' Shape'
|
||||
Reference in New Issue
Block a user