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.
One of the Codewars goals is to replicate real testing frameworks as close as possible. If busted sets the random seed automatically in its output handler, the same should be done in Codewars. Actually, it is more accurate to say that the busted test runner sets the random seed (not the output handler).
Just curious, what does output handler have to do with any kind of randomness?
Approved
You should open an issue in the Codewars runner repository about this.
Done.
The default output handler of busted automatically sets a random seed, but the codewar output handler doesn't. I think a better way is to set the seed directly in the output handler.
Please add
math.randomseed(os.time())
to random tests. It is not very important for easy kata but it is better to be consistent and don't forget it (I forgot about it when I approved your translations yesterday).Approved
Approved
Approved
Approved
Approved
Approved
Done.
Approved
Fibonacci numbers computed with Lua integers are correct up to
n = 92
only.I suggest to reduce the range of
n
in random tests. The main point of this kata is to write an iterator so small values ofn
should be fine.Loading more items...