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.
Couldn't it happen that the year was 0001?
THERE'S A FORMULA FOR FIBONACCI????
what the...
I did believe that should be simple formula )))
wow
Looks great, thanks for the quick fix!
That's some great advice. I've corrected the tests accordingly.
Thank you for your feedback!
A few suggestions:
Run the code next to the tests. Don't run all the code, then test it, this makes it much harder to debug.
Use the built-in Test library functions for comparing the arrays, it provides more feedback:
Then you don't need your array comparison function at all.
Use
describe
andit
to group your code, just as a general habit:Your example test cases are wrong, they point to a non-existent variable. I'd fix the above, then redo those cases to use
Test.assertSimilar
as well.Otherwise, this is a pretty fun, straighforward kata!
Hah! My code doesnt work. I see now. Thanks.
This error refers to the testMatrix2 which should output expected2. It's the second test, so maybe you should check if your function works properly when called multiple times.
Not sure what is happening with this. The error message is a bit vague. I get 'Test Passed
Test failed: 8x8 matrix. zombie is number 1'. I have copied the test arrays to my local version and my code seems to pass fine. I have no idea what array it is failing on or why.
I thought that this was an incorrect solution.
If the year was 1 it would produce 1th.
It shows that I should read the instructions properly.
Good work!
I agree with the above comments but accidently clicked the 'Best practices' button...doh!