Python Program to Know whether a year is leap or not
#program to check whether the year is leap or not
year=input("\n enter the year to check whether it is leap or not")
if year%4==0 and year%100!=0 or year%100==0 and year%400==0 :
print "",year," is a Leap Year"
else :
print "",year ,"is Not a Leap Year"
year=input("\n enter the year to check whether it is leap or not")
if year%4==0 and year%100!=0 or year%100==0 and year%400==0 :
print "",year," is a Leap Year"
else :
print "",year ,"is Not a Leap Year"
Comments
Post a Comment