"""
We can refactor the function to use a recursive inner function that calls itself to
subtract 2 from the starting number until the number is less than 2, and then use
% (modulo operator) with 2 and compare the remainder with zero to return a
Boolean. Even numbers are divisible by 2 and don’t have a remainder.
"""
def is_even_recursive(number):
def check(num):
if (num < 2):
return num % 2 == 0
return check(num - 2)
if check(number):
return True
return False