Leap year or not program in python using if else condition

Leap year or not program in python using if else condition. Program in Python whether it’s a leap year or not. This software determines whether or not the year is a leap year. It will print the year in python for beginners, which is executed by the value. a year of 366 days and an intercalary day on February 29th that occurs every four years.

year = 1998
if (year % 4) == 0:
if (year % 100) == 0:
if (year % 400) == 0:
print("{0} is leap year".format(year))
else:
print("{0} is not leap year".format(year))
else:
print("{0} is leap year".format(year))
else:
print("{0} is not leap year".format(year))

Output

1998 is not leap year