AnkitWebLogic

Find year is leap year or not | Python

If Exercise 2: Write a Program in Python, Input year and find it is leap year or not. 1

# Input year and find it is leap year or not | ankitweblogic.com
a=int(input("Enter Year: " ))
if a%4==0:
    print(a, "is a leap year")
else:
    print(a, "is not leap year")
Run 1:
Enter year: 2023
2023 is not a leap year
Run 2:
Enter year: 2024
2024 is a leap year

Advertisement