"f"
then return the Fibonacci sequence and if it is "l"
, then return the Lucas sequence. The sequences must be returned as an array.
fib_luc
should be a function.
testString: assert(typeof fib_luc === 'function');
- text: fib_luc(2,10,"f")
should return [1,1,2,3,5,8,13,21,34,55]
.
testString: assert.deepEqual(fib_luc(2,10,"f"),ans[0]);
- text: fib_luc(3,15,"f")
should return [1,1,2,4,7,13,24,44,81,149,274,504,927,1705,3136]
.
testString: assert.deepEqual(fib_luc(3,15,"f"),ans[1]);
- text: fib_luc(4,15,"f")
should return [1,1,2,4,8,15,29,56,108,208,401,773,1490,2872,5536]
.
testString: assert.deepEqual(fib_luc(4,15,"f"),ans[2]);
- text: fib_luc(2,10,"l")
should return [ 2, 1, 3, 4, 7, 11, 18, 29, 47, 76]
.
testString: assert.deepEqual(fib_luc(2,10,"l"),ans[3]);
- text: fib_luc(3,15,"l")
should return [ 2, 1, 3, 6, 10, 19, 35, 64, 118, 217, 399, 734, 1350, 2483, 4567 ]
.
testString: assert.deepEqual(fib_luc(3,15,"l"),ans[4]);
- text: fib_luc(4,15,"l")
should return [ 2, 1, 3, 6, 12, 22, 43, 83, 160, 308, 594, 1145, 2207, 4254, 8200 ]
.
testString: assert.deepEqual(fib_luc(4,15,"l"),ans[5]);
- text: fib_luc(5,15,"l")
should return [ 2, 1, 3, 6, 12, 24, 46, 91, 179, 352, 692, 1360, 2674, 5257, 10335 ]
.
testString: assert.deepEqual(fib_luc(5,15,"l"),ans[6]);
```