Skip to content

Commit

Permalink
fix last line
Browse files Browse the repository at this point in the history
  • Loading branch information
Muna-S committed Jan 10, 2025
1 parent 37c7197 commit 9f25c27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solutions/leap_year.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ def leap_year(year: int) -> bool:
if year < 0:
raise ValueError("Year must be positive integer")

return year % 400 == 0 or (year % 4 == 0 and year % 100 != 0)
return (year % 4 == 0 and (year % 100 != 0 or year % 400 == 0))

0 comments on commit 9f25c27

Please sign in to comment.