artık yıl örneği 1

This commit is contained in:
Mert Gör 🇹🇷 2023-08-03 23:17:54 +03:00
parent 34e28754fd
commit bcf2574136
No known key found for this signature in database
GPG key ID: 2100A876D55B39B9

12
python-temel/artik.yil.py Normal file
View file

@ -0,0 +1,12 @@
class Date:
def __init__(self, day, month, year):
self.day = day
self.month = month
self.year = year
@staticmethod
def is_leap_year(year):
return year % 400 == 0 or year % 4 == 0 and year % 100 != 0
result = Date.is_leap_year(2000)
print('Artık' if result else 'Artık değil')