Leap Year Program in Python

Check Leap Year Program in Python

Here you will get the source code of leap year program in python programming. In this program, we will use if-else(conditional statement ).

 

What is a leap year?

Leap year occur every four years, with the exception of century years (years ending in 00). A year that is divisible by 4 with the exception of years that are divisible by 100 but not by 400.

 

Example code of Leap Year Program in Python

Output 1

Enter a year: 2001
2001 is not a leap year

Output 2

Enter a year: 2020
2020 is a leap year

 

 

Check out our other Python Programming Examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top