diff --git a/python-temel/class.date.mutable.py b/python-temel/class.date.mutable.py new file mode 100644 index 0000000..5b0f9b8 --- /dev/null +++ b/python-temel/class.date.mutable.py @@ -0,0 +1,12 @@ +class Date: + def set(self, day, month, year): + self.day = day + self.month = month + self.year = year + + def disp(self): + print('{}/{}/{}'.format(self.day, self.month, self.year)) + +date = Date() +date.set(10, 12, 1990) +date.disp() diff --git a/python-temel/class.date.mutable.py~ b/python-temel/class.date.mutable.py~ new file mode 100644 index 0000000..c7c77dd --- /dev/null +++ b/python-temel/class.date.mutable.py~ @@ -0,0 +1,8 @@ +class Date: + def set(self, day, month, year): + self.day = day + self.month = month + self.year = year + + def disp(self): + print('{}/{}/{}'.format(self.day, self.month, self.year))