[Tutor] NEWBIE- how to make a program continue

alan.gauld@bt.com alan.gauld@bt.com
Wed, 20 Feb 2002 17:44:41 -0000


> def julian_leap (y) :
> 
> Except in reality, leap year is not quite so simple
> as "every fourth year".
> 
> Something like:
> 
> def julian_leap (y) :
>      rtnval = 0
>      if (y%100)==0:
>         if (y%400)==0:
>            rtnval = 1
>      elif (y%4) == 0:
>         rtnval = 1
>      return rtnval

But isn't this only true of the Gregorian calender? 
So Julian leap years are as per the original and 
Gregorian leaps as per your function - or is it 
the other way around?

Alan g.