You know the Fibonacci numbers: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ⦠Each number is the sum of the previous two. Letâs say the zeroth Fibonacci number is zero, so: And letâs say you want to write some code to compute this function. How would you do it? Perhaps something like this? (Python code) def fib_rec(n): assert n >= 0 if n < 2: return n return fib_rec(n-2) + fib_rec(n-1) This is a pr
{{#tags}}- {{label}}
{{/tags}}