4 ms·
Your function will return 2 for index = 4, whereas it's expecting 3.
by viceroyalbean 7y ago
Your function will return 2 for index = 4, whereas it's expecting 3.
- stevewodil 7y agoThen are the instructions not clear enough, or am I just missing something.... From the website: "For example, the sequence [0, 1, 1, 2, 3, 5, 8, 13, 21, 34] forms the first ten entries of the Fibonacci sequence." Entering 4 should return 2 in this case, which is correct? I don't get it.
- fwip 7y agoIndex 4 is the fifth element, 3. Index 0 is the first element (a zero). Reread the examples.
- stevewodil 7y agoHmm...I see. Thank you for the help!