title: Fib2 function without recursion in Python
body: <p>I need help for defining the fibanocci 2 function. The fibanocci 2 function is decribed as :
  fib2(n) = {0 if  n &lt;= 0, 1 if  n = 1, 2 if  n = 2, ( fib2( n - 1) * fib2( n - 2)) - fib2( n - 3) else}</p>
  <p>We need to define this function iterative.
  I tried my best but i couldn't write a working code.</p>
  <pre><code>def fib2(n: int) -&gt; int:
      if n &lt;= 0:
          return 0
      elif n == 1:
          return 1
      elif n == 2:
          return 2
      else:
          n = ((n - 1) * (n - 2) - (n - 3)
      return n
  a = fib2(7)
  print (a)
  assert (fib2(7) == 37) 
  </code></pre>
  <p>the output from this fib2 function is 26 but it should be 37.
  Thank you in advance</p>