Draft
The Fibonacci Code
Description:
Create a function that takes any number, and produces a fibonacci sequence based off that number. A fibonacci sequence is a list of numbers, where each number is the sum of the two numbers preceeding it. The first and second number in the sequence should just be the initial number given. There is also an input for how many numbers long the sequence should be. The output should be an array.
fibonacci(1,12) // => [1,1,2,3,5,8,13,21,34,55,89,144]
fibonacci(7,5) // => [7,7,14,21,35]
The function should also work with negative numbers. If the first number given is 0, then the second should be 1, and the sequence should follow as normal afterwards.
Similar Kata:
Stats:
Created | Jul 20, 2017 |
Warriors Trained | 164 |
Total Skips | 7 |
Total Code Submissions | 321 |
Total Times Completed | 65 |
JavaScript Completions | 65 |
Total Stars | 2 |
% of votes with a positive feedback rating | 73% of 35 |
Total "Very Satisfied" Votes | 23 |
Total "Somewhat Satisfied" Votes | 5 |
Total "Not Satisfied" Votes | 7 |
Total Rank Assessments | 31 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |