Sergei089 / python_ex

1 stars 1 forks source link

hexlet 30 високосный год #70

Closed vovs03 closed 1 year ago

vovs03 commented 1 year ago
def is_leap_year(year):
    if year % 400 == 0:
        res = True
    elif year % 4 == 0 and year % 100 != 0:
        res = True
    else:
        res = False
    return res
Sergei089 commented 1 year ago
def is_leap_year(year):
    return year %400 == 0 or ( year %4 == 0 and year %100 != 0 )
print(is_leap_year(year))%
vovs03 commented 1 year ago

af63 commit