artık yıl örneği 1
This commit is contained in:
parent
34e28754fd
commit
bcf2574136
12
python-temel/artik.yil.py
Normal file
12
python-temel/artik.yil.py
Normal 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')
|
Loading…
Reference in New Issue
Block a user