fibo digit array:
1 2 3 4 5 6 7 8 9 10 11
0 1 1 2 3 5 8 13 21 34 55
we can find out the rule(law ,regularity,disciplinarian).
the number equity before it two number summary
number = number -1 + number -2
this is fibo disciplinarian:
def array_fibo(n):
if n<=2:
return n
return array_fibo(n-1)+fibo(n-2)
print(array_fibo(n))
or :
def array_fibo(n):
if n==1:
return 0
if n==2:
return 1
return array_fibo(n-1)+array_fibo(n-2)