I'm completely confused as to why my code is returning none. I'm new and have been searching for a while and i'm still lost.
class Fibonacci:
def __init__(self, max = 0):
self.max = max
def __iter__(self):
self.n = 0
return self
def __next__(self):
if self.n <= self.max: # if n is less that 0
def FIB(number):
if number == 1 or number == 2:
return 1
else:
return FIB(number - 1) + FIB(number - 2)
self.n += 1
else:
raise StopIteration