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.
antigravity
C Fork
tester
visible in sample teststester
staticI would just like to let you know that the testing code has been updated. Please
copy
your code, click theRESET
button in the trainer (the new tester will replace the old old), thenpaste
back in your code, and try running it. You will see a different formatting of complete available information for that test. Please let me know what you think! And best of luck debugging your code submission for this kata.approved
gotcha
done
you should really start using a macro to compute array lengths, when they are determined by an initializer list (e.g.
int array[] = {1, 2, 3};
).There is a mistake that demonstrates the dangers of hardcoding: you have two arrays of tests in the fixed and sample tests, one is of length
4
and the other of length3
; but you copied over the sample tests' loop code to the fixed tests:this would never happen if you instead let the compiler do the work for you:
Okay bro I edited it , you can see the problem now
please tell me if it need more explaination or fixing errors
retired
0n
is not astring
, it's abig integer
valuehttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
.
C Fork
Hi, and welcome to Codewars!
Sorry, but your solution is incorrect. The error message feedback for the
Sample
andFixed
tests shows you this:The expression (summation(8)) == (36) is false.
Which means for the input
8
sent into the functionsummation()
result in the output of36
which is not the expected output. The output should==
something else, but it doesn't tell you that piece of information.The random test looks a little different:
Expected: 29646 Received: 243
This does tell you the expected result of
29646
should have been received from your function, but instead the testing code received an incorrect output of243
. Meanwhile, this testing format leaves something else out, which in this case is the actualinput
for the test that was failed...You are welcome!
As you can see, you still do not have Random Tests. Simply because they are
always the same answer
for every test run, they can be known; so they are not at all random.Please read the guidelines from the first link I gave you.
Also, here is the official documentation on specifically: writing random tests.
Best of luck!
ages
code should be deleted / removedIt is very much not resolved look at the tests lmao
Loading more items...