Tuesday 6 November 2012

Find Leap Year using NOT Operator?

#leap Years are those who can be completely divisible by 4. On the other hand those years in which Month February contains 29 Days. like in 2012.

year=input('Enter An Year: ')
if not year%4==0:
    print year,'is not a Leap Year.'
else:
    print year,'is A leap Year.'

No comments:

Post a Comment