1. Years divisible by 400
2. Years that are divisible by 4 but not divisible by 100
One of the above two methods is a leap year
def fun(): year = int(input("As long as you enter a year I can tell you if it is a leap year:")) if (year%400 == 0) or (year%4==0 and year%100 != 0): print("The year you entered [%d] is a run year"%year) else: print("The year you entered [%d] is not a run year"%year) fun()