How to debug it?
def f(n, m):
while f(n, m) != int(f(n, m)):
if n == 1:
return 1
elif n >= m - 1:
return 0
elif n >= 2 and n != m - 1:
f(n, m+1) = f(n-1, m) + f(n, m) + f(n+1, m)
print(f(2, 4))
In console it appear error here
File "compiler.py", line 8 f(n, m+1) = f(n-1, m) + f(n, m) + f(n+1, m) ^ SyntaxError: can't assign to function call
You are writing
f(n, m + 1) is not a variable, it's a call for a function. I don't know what you are trying to achieve here with this weird code.