y=int(input(“Enter an year : ”)
if y%100==0:
if y%400==0:
print(“Century year and leap year”)
else:
print(“Century year but not a leap year”)
else:
if y%4==0:
print(“Leap Year”)
else:
print(“Not a Leap Year”)
What will be the output of above program when following input is provided to it. Attempt any
two
(i) 1984 (ii) 1700 (iii) 1600
Answers
Answered by
3
1984 -> Leap Year
1700 -> Century year but not a leap year
1600 -> Century year and leap year
Similar questions