So I'm working on a helper function to help with a recursion problem I recently received from class, and this is what it looks like:
def helper(a, b):
if (a % b == 0 and b > 1):
return False
elif (a%b != 0 and b > 1):
helper(a, b - 1)
If I put in something like (12, 11), I expect the result to be False, but I instead get met with None! Why does it do that? If I replace "return False" with a print statement, it comes out fine, so it seems like the return statement is being completely ignored. How should I fix this? Thanks!