Created
November 19, 2021 13:58
-
-
Save katorly/af02eb6e80b2ff5604c826b30ced540e to your computer and use it in GitHub Desktop.
Check whether a particular year is leap year or not.
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
while(True): | |
x = int(input("Please input a particular year:")) | |
if x % 100 == 0: | |
if x % 400 == 0: | |
print(x,"is a leap year!") | |
elif x % 4 == 0: | |
print(x,"is a leap year!") | |
else: | |
print(x,"is not a leap year!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment