On Jan 7, 2008 12:42 PM, Angela Gay <[EMAIL PROTECTED]> wrote: > Gli anni bisestili sono tutti quelli divisibili per 4 tranne quelli > divisibili per 100, che lo sono se sono anche divisibili per 400. > Non conosco pyton. In sintassi Pascal-like, sarebbe: > Function Bisestile(anno:Integer):Boolean; > Bisestile := anno mod 4 = 0 and (anno mod 100 <> 0 or anno mod 400 = 0)
def isleap(year): return (year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0)) non testata :D -- Lawrence, stacktrace.it - oluyede.org - neropercaso.it "It is difficult to get a man to understand something when his salary depends on not understanding it" - Upton Sinclair _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python