Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The purpose of the function you're writing is to return the nth Fibonnacci term.
"nth_fib(1)" he expects "0" as an answer; 0 is the 1st term in the sequence.
"nth_fib(4)" he expects "2"; similarly, 2 is the 4th term in the sequence.
Consequently, provided n, return the nth number of the Fibonnacci sequence.
Hello!
The Fibonacci sequence begins with the following 14 integers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233..
When he first asks me about the "nth_fib(1)" he expects "0" as an answer
which just makes no sense since "1" is the 2nd and the 3rd number
same with "nth_fib(4)" he expects "2" as an answer but there is no "4" in the whole sequence
so i just don't get what he is asking for, Thanks in advance.
Thanks a lot for your fast reply
and thanks for your work on answering questions and issues
Have a good one
warm regards too
Hi there! The 8 is the count of how many numbers meet the criteria while 118 is the lower bound of the eight numbers and 334 is the upper bound. In other words, if you find all the numbers and put them in an array
A = [118, 127, 136, 145, 226, 235, 244, 334]
, then the answer is[length(A), min(A), max(A)]
Hello!
I am a little confused on the Kata Details.
From what i understood, he'd give me 2 parameters: One for the sum of digits, and one for the amount of digits.
My task is to return 3 numbers where the sum of digits is equal to "sum_dig", and the numbers must have a specified amount of digits in them.
My question is:
test.assert_equals(find_all(10, 3), [8, 118, 334])
Here the answer should be [8, 118, 334]
but why is there an "8" there?
shouldn't there be another 3 digit number that the sum of its digits equals 10?
Thanks for reading
mhm agreed, goddamn beautiful
you right bro
DAMN SO COOL
Read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#print-input and don't mutate the input.
It happened to me too. Also, in my case, with java, every time I try to attempt the random tests fail, but if I put those on the testing section then the tests pass.
No:
Read the title and the kata description again.
codewars can't be created from code and wasr
codewars is not a merge of cwdr and oeas
ah yes, codewars can't be created from code and wasr
also, the kata never mentioned anything about merging, this is all so weird
i'll try researching about it, thanks a lot!
Also, beware of plateaus !!! [1, 2, 2, 2, 1] has a peak while [1, 2, 2, 2, 3] and [1, 2, 2, 2, 2] do not.
incase of
[1,2,2,2,3]
isn't the 3 here a peak?Loading more items...