Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

solve problem courses/2506 engineers 14 440 127-spring 20 3130-fibonacci sequenc

ID: 3796308 • Letter: S

Question

solve problem courses/2506 engineers 14 440 127-spring 20 3130-fibonacci sequence/solutionsnew hing ca o sakainutgersedu Ga a Form w 7 Rev Septe D 4- Express the mo caloukus t978146412 D New Tob D uitedHealthcare arushi tandon V Fibonacci Sequence Problem Description write a function that takes a number, n, as an input and returns an array, fib, that is the Fibonacci sequence of length n. fyou fib fibonacci(10) fib would be: [0112358 13 21 34]: The Fibonacci sequence always starts with 0 and then 1-Every subsequent number is the sum of the previous two numbers. A sequence of length 1 would be: And a sequence of length 2 would be: (01) DELL

Explanation / Answer

1) This Test case will be executed succesfully

as fibonacci(5) = [0 1 1 2 3]

2) This Test case will be failed

fibonacci(1) = [0]

3) This Test case will be executed succesfully

as fibonacci(2) = [0 1]

4) This Test case will be executed succesfully

as fibonacci(10) = [0 1 1 2 3 5 8 13 21 34]

So only Test case 2) will be failed remaining will become success