diff --git a/Python/Introduction/Write_a_function.py b/Python/Introduction/Write_a_function.py index e57021a..2ca8307 100644 --- a/Python/Introduction/Write_a_function.py +++ b/Python/Introduction/Write_a_function.py @@ -27,13 +27,8 @@ def is_leap(year): leap = False # Write your logic here - if year % 400 == 0: - leap = True - elif year % 100 == 0: - leap = False - elif year % 4 == 0: - leap = True - + if (year % 4 == 0 and year % 100 != 0 or year % 400 == 0): + leap = True return leap year = int(raw_input())