Leap year
Python Branching
compound condition
Flowchart (ISO 5807)
Source code
def is_leap(y):
if y % 4 == 0 and (y % 100 != 0 or y % 400 == 0):
return True
return False compound condition
def is_leap(y):
if y % 4 == 0 and (y % 100 != 0 or y % 400 == 0):
return True
return False