Generate the first 5 terms of this sequence: f(1) = 0 and f(2) = 1, f(n) = f(n - 1) + f(n - 2), for n > 2. 0, -1, 1, 0, 2 0, 1, 1, 2, 3 0, 1, 2, 2, 3 0, 1, 1, 2, 2
@SACAPUNTAS @kraken123
@ranga
I don't know how to do this one.
Sorry, I have to leave now. You are getting this, though... keep at it. :)
Thanks for all your help, g'bye.
its Fibonacci series
f(n) = f(n - 1) + f(n - 2) Put n =3 f(3) = f(2) + f(1) = ?
I don't understand? :/
every number after the 2 nd term is the sum of previous two numbers
so the answer is b)
They tell you f(1) = 0 and f(2) = 1 and so what is f(3)? f(3) = f(2) + f(1) = ? It looks like there are others willing to give you the answers without helping you learn. So I am out.
Here is an outline of what it would look like in python: http://www.codeskulptor.org/#user20_mKYol66NQV_1.py (Need Firefox or Chrome for best compatibility). Examine the code and see if you can work through it.
I actually want to learn though. @ranga Thanks for explaining.
Join our real-time social learning platform and learn together with your friends!