On 15/05/07, Arthur Coleman <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I believe it should be if !(year % 4) or !(year % 100) or !(year % 400)

FWIW, the correct leapyear test is:

if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
    # then year is a leap year

Year 2100 will not be a leap year, despite being divisible by 4.  But
y2k was a leap year, because it was a multiple of 400.

-- 
John.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to