You are viewing a single comment's thread. Return to all comments →
That exactly is not the case. Try to run following code in interpreter:
def is_leap(year):
return (not(year%4) and ((year%100) or not(year%400)))
Invoke it using
is_leap(1464)
It returns 64 instead of True. Thats because the expression (year%100) returns 64
Seems like cookies are disabled on this browser, please enable them to open this website
Write a function
You are viewing a single comment's thread. Return to all comments →
That exactly is not the case. Try to run following code in interpreter:
def is_leap(year):
Invoke it using
is_leap(1464)
It returns 64 instead of True. Thats because the expression (year%100) returns 64