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.
This test case expectation is for array above the printed text (not below). The one you showed expects 'NO'.
Also, if you open a new thread, please continue there, don't create new ones for no good reason.
Thank you. This is what I am getting:
'NO' should equal 'YES'
Log
[25, 25, 25, 25, 25, 100, 100]
Test case seems to be wrong or am I readin something incorrectly? There is no change left for the 2nd 100...My logic is saying "NO", Test case is expecting "YES".
'NO' should equal 'YES'
Log
[25, 25, 25, 25, 25, 100, 100]
Test case seems to be wrong or am I readin something incorrectly? There is no change left for the 2nd 100...My logic is saying "NO", Test case is expecting "YES".
Please see if this helps: https://docs.codewars.com/training/troubleshooting/#print-input
I am failing 1 of the 20 test cases but cannot get any details on the input that is being used for that particular test casse. Can anyone help me here?
the error message is most probably caused by the fact that OP's solution has a side effect (it mutates global variables), and is called twice. First call returns a correct result, but its used only to build an assertion message. the next call uses mutated state and returns invalid result, assertion fails, and the message composed in the previous step (i.e. the one with the correct answer) is displayed.
Test suite is wrong because it calls user solution twice. Solution is wrong because it uses global variables.
Well, I'm not sure how you got that error message, because for me your code produces other problems, like
because of the syntax issue of apparently intending to show multiplication of
first_num * n
instead. This also happens at2i
which should be2 * i
. Finally, you also have variables declared outside the function that should be inside the function. That might be it, just don't forget the include theinttypes
header.Please see here on how to post code in kata discourse: https://docs.codewars.com/references/markdown/#code-block
@rowcased, please let me know if that works for you to view my logic.
This comment is hidden because it contains spoiler information about the solution
Hi @RJ20192, can you please post your code with proper markdown and a spoiler tag? I have a guess as to why your code might fail but I'd like to see why you're getting that error message, thanks.
C
Which language?
I am getting an error "rowSumOddNumbers(2) should return 8, actual: 8", I can't seem to see the issue here. Can someone please help me?
A bit of thought shortcut on my part, what I meant is that if you understand what this kata is about answer to your question is trivial, but without you stating what you know and what you don't, there's no way to tell what explanation you expect.
Loading more items...