Question
To Find whether the given year is a leap year or not.
Sample TestCaseExpected Output
Enter the Year: 2020 Leap Year
Answer
year=int(input("Enter the Year : "))
if(year%4==0 and year%100!=0 or year%400==0):
print("Leap Year")
else:
print("Not a Leap Year")

No comments:
Post a Comment