class date mutable
This commit is contained in:
parent
7c5681f7d3
commit
e6c98179c4
12
python-temel/class.date.mutable.py
Normal file
12
python-temel/class.date.mutable.py
Normal file
|
@ -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()
|
8
python-temel/class.date.mutable.py~
Normal file
8
python-temel/class.date.mutable.py~
Normal file
|
@ -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))
|
Loading…
Reference in New Issue
Block a user