Last active
February 13, 2022 07:58
-
-
Save browneye1826/9011740e306ce5a9e5d58363d65a6cf4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_leap_year(year: int) -> bool: | |
"""Return True if the given year is a leap year, False otherwise | |
Args: | |
year (int): an integer representing the year | |
Returns: | |
A boolean value. | |
""" | |
return year % 400 == 0 if year % 100 == 0 else year % 4 == 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment