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.
can anyone make python support?
fixed
assert.deepEqual
should be usedNode 12 should be enabled (Refer this and this for more info)
I think your issue is you're getting stuck in an infinite while loop when the solution doesn't reduce to 0. The random tests include random numbers that won't necessarily reduce to 0 and should return false.
Hope that helps!
it was indented when i pasted
now i know! thanks! i always wondered what the hidden comments were.
just use the spoiler flag, that the tool for that. ;)
EDIT: too late ;)
But use indentation so that your code is readable.
what's the best way to show you outside of posting here? i don't want to post any spoilers for those still working.
Could you post your solution so I could try and replicate your problem? Thanks!
all my tests pass, but i fail, getting the message "Process was terminated. It took longer than 12000ms to complete". not sure why this is happening.
I think that if you're going to count twin primes that include n + 1 you should state that in the description as it was unclear before I ran the tests.
.
That should do really. At least it's a falsy value, with all the real answers truthy (I've abused this for backtracking; I shouldn't complain about it :P ).
You don't need a try/catch handler, not even for testing. See Test.expectError().
Thanks for the feedback! I've now added random tests :)
Thanks for the feedback!
I've changed the kata so now the required output for errors is
false
, do you think that is sufficient or do I need to put it a try/catch error handler for best practise?Loading more items...