Skip to content

Instantly share code, notes, and snippets.

@anuragrana
Last active October 7, 2018 10:13
Show Gist options
  • Save anuragrana/bf2537be087ffec639e787b20ab0c1a7 to your computer and use it in GitHub Desktop.
Save anuragrana/bf2537be087ffec639e787b20ab0c1a7 to your computer and use it in GitHub Desktop.
#
# Program to confirm is a given year is leap year or not
# year is provided at runtime.
# Author: https://www.pythoncircle.com
#
def is_leap(year):
leap = False
if year % 4 == 0:
if year % 100 == 0:
if year % 400 == 0:
return True
return False
return True
else:
return False
return leap
if __name__ == '__main__':
print(is_leap(int(input())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment