Leap year or not in Python

A Leap year is an year which is divisible by 4. Here is how you can find a leap year in Python

Source code :

year = 2016

if (year % 4) == 0:
    print(str(year) + " is a Leap year")
else:
   print(str(year) +" is not a Leap year")

Output :

2016 is a Leap year

Output :


                

Comments :