Python Program to Know whether a year is leap or not

#program to check whether the year is leap or not

year=input("\n enter the year to check whether it is leap or not")


if year%4==0 and year%100!=0 or year%100==0 and year%400==0 :
    print "",year," is a Leap Year"
else :
    print "",year ,"is Not a Leap Year"

Comments

Popular posts from this blog

Appending and Prepending in Yocto - +=, =+ vs .=, =.

Connecting Serial ports of two Ubuntu VMWare Virtual Machines

Linux Commands for Hardware Info - lshw, lspci, lsdev, lscpu, lsblk, lsusb