Skip to content

Instantly share code, notes, and snippets.

@SiddharthManthan
Created February 16, 2022 17:45
Show Gist options
  • Save SiddharthManthan/913dac9cbe362280d961ca9078cc66ad to your computer and use it in GitHub Desktop.
Save SiddharthManthan/913dac9cbe362280d961ca9078cc66ad to your computer and use it in GitHub Desktop.
Find leap year
def leap_year(year):
if year % 4 == 0:
if year % 100 == 0:
if year % 400 == 0:
print("It's a leap year.")
else:
print("It's not a leap year.")
else:
print("It's a leap year.")
year = int(input("Enter Year : "))
leap_year(year)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment