Skip to content

Instantly share code, notes, and snippets.

@katorly
Created November 19, 2021 13:58
Show Gist options
  • Save katorly/af02eb6e80b2ff5604c826b30ced540e to your computer and use it in GitHub Desktop.
Save katorly/af02eb6e80b2ff5604c826b30ced540e to your computer and use it in GitHub Desktop.
Check whether a particular year is leap year or not.
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