import calendar
def checkYear(year):
return(calendar.isleap(year))
year = int(input())
if (checkYear(year)):
print(“Leap Year”)
else:
print(“Not a Leap Year”)
import calendar
def checkYear(year):
return(calendar.isleap(year))
year = int(input())
if (checkYear(year)):
print(“Leap Year”)
else:
print(“Not a Leap Year”)
Good, Keep it up, Practice with if else condition also.
def checkYear(year):
return (((year % 4 == 0) and (year % 100 != 0)) or (year % 400 == 0));
year = int(input())
if(checkYear(year)):
print(“Leap Year”)
else:
print(“Not a Leap Year”)