A Common-Sense Guide to Data Structures and Algorithms in Python, Volume 1: logic error (pg. 45)

@jaywengrow
Exercise 1. on pg. 45 examines the time complexity of the determination of a leap year. However, the logic of the first branch is backwards. Here is the correct definition:

def is_leap_year(year):
    if year % 100 == 0:
        if year % 400 == 0:
            return True
        else:
            return False

    return year % 4 == 0