How to Find Leap Year with Python
Leap Year
def how_to_find_leap_year(year):
if (year%4==0 and (not year %100==0 or year%400==0)):
return "Leap Year"
return "Not Leap Year"
print how_to_find_leap_year(1900)
Output Not Leap Year
Comments
Post a Comment