@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