Decode School

Decode School - The School for Problem Solvers
Need Assignment / Project Guidance (or) Training in Python?

Leap year in python

Python Program to get a year and check whether year is leap year or not.

Sample Input 1:

2016

Sample Output 1:

Leap year

Sample Input 2:

2017

Sample Output  2:

Not Leap Year

Program or Solution

					    
							
					    
					

Program Explanation

Get input year from user using input() method check whether the remainder of year divided by 4 is equal to 0 using if statement.

if it is 0, then print year is leap year using print() method.

Else print year is not leap year using print() method.