0
Fibanocci
Can someone explain me how fibanocci works!?
7 Answers
+ 4
It starts from 0 and 1
Then it sums up the 2 subsequent numbers. Ex-
0,1
0+1=1
1+1=2
2+1=3
3+2=5
5+3=8
8+5=13...
+ 2
+ 2
Fibonacci goes smthg like this,
The first 2 nums are fixed which are 0 and 1
The whole sequence is formed using these two..
The ith number gets generated using the sum of previous 2 numbers.
So, as 0 and 1 are fixed the third number will be 0+1 which is 1 again.
The fourth number will be 1+1 (sum of 2nd and 3rd element which are the previous 2 nums of fourth number) which is 2.
Fifth number will be 1+2 which is 3.
Sixth will be 2+3, which is 5.
So on....
This is the process to generate a fibonacci sequence.
+ 1
This python FASTERS Fibonacci function
https://code.sololearn.com/c7a217A4a13a/?ref=app
0
I can find it in google, but I need in a clean and pure way
btw thanks :)
0
Helpful :)