init date month year

This commit is contained in:
Mert Gör 🇹🇷 2023-06-20 20:01:04 +03:00
parent 194163d543
commit bb4ba807b7
No known key found for this signature in database
GPG Key ID: 2100A876D55B39B9
2 changed files with 22 additions and 0 deletions

11
python-temel/init.2.py Normal file
View File

@ -0,0 +1,11 @@
class Date:
def __init__(self):
self.day = 1
self.month = 1
self.year = 1900
def disp(self):
print('{}/{}/{}'.format(self.day, self.month, self.year))
date = Date()
date.disp() # Date.disp(date)

11
python-temel/init.2.py~ Normal file
View File

@ -0,0 +1,11 @@
class Date:
def __init__(self):
self.day = 1
self.month = 1
self.year = 1900
def disp(self):
print('{}/{}/{}'.format(self.day, self.month, self.year))
date = Date()
date.disp() # Date.disp(date)