diff --git a/solutions/python/leap/1/leap.py b/solutions/python/leap/1/leap.py new file mode 100644 index 000000000000..db80963bef3b --- /dev/null +++ b/solutions/python/leap/1/leap.py @@ -0,0 +1,4 @@ +def leap_year(year): + #The program determines if a year is a leap year + return((year%4==0 and year%100!=0) or (year%100==0 and year%400==0)) + \ No newline at end of file diff --git a/solutions/python/leap/2/leap.py b/solutions/python/leap/2/leap.py new file mode 100644 index 000000000000..06847a58fd6b --- /dev/null +++ b/solutions/python/leap/2/leap.py @@ -0,0 +1,4 @@ +def leap_year(year): + """"The program determines if a year is a leap year""" + return((year%4==0 and year%100!=0) or (year%100==0 and year%400==0)) + \ No newline at end of file