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.
"works" in this context means that you your code didn't fail because you did not test the case that fails
if you're looking at the string the keyerror mentions, that's what you gave to a dict for lookup. you should be looking at what the input was instead.
"My solution does not work" is not a valid kata issue.
We cannot tell where your solution is wrong without knowing your solution :)
My Python solution works in VSC, but not in CodeWars. In CodeWars, I am seeing two tests fail, for "thousand" and "eight thousand one". Both come up with KeyError logs on the site, but work as expected in my VSC editor. Am I doing something wrong?
P.S. I am of the opinion that my solution is rather inefficient but it was my first attempt at solving the issue, for optimisations to be made afterwards.
Feels like 8 Kyu more than 6 Kyu...
It turned out to be a bug in user's solution.
I saw and fixed the problem. Something so small :'(
Thanks for the hint 👍
edit: cross-post
You need to triple-check ;) I managed to get your solution to work after I initialized all the variables and arrays.
Without seeing your code we cannot tell where it's wrong. You'd have to post your code (remember about code formatting markdown!) so we could check it and tell you what you did wrong. If it's indeed a corrupted memory, you need to fix your code so it does not corrupt memory :)
I have a problem in the C language, I saw other posts with a similar problem (I gave the same reply in one of those posts)
Everything works well when I copy-paste the code to https://programiz.pro/ide/c
When I do it in the Kata some tests fail. What's more, sometimes it fails with "twenty gave 21", sometimes it fails with "two hundred and forty-six gave 247".
One or the other test will fail randomly even if I don't modify a single character in the code. I double checked that I initialized the variables and the arrays.
I suspect that the memory gets corrupted at some point for some reason (concurrency issue?).
I have the exact same problem with the C language.
Everything works well when I copy-paste the code to https://programiz.pro/ide/c
When I do it in the Kata it fails. What's more, sometimes it fails with "twenty gave 21", sometimes it fails with "two hundred and forty-six gave 247".
One or the other test will fail randomly even if I don't modify a single character in the code. I double checked that I initialized the variables and the arrays.
It's probably a memory issue where the memory gets corrupted at some point for no apparent reason.
Maybe OP didn't use pointers or used them in different ways.
more of 8 kyu or 7 kyu if im being generous. im a total beginner, i suck utterly at python and i completed this in 2 minutes
In Scala
In what language?
the code pass the test, but then is not possible to attempt, becouse of the following failure
assert(left(op(right)) == refsol(x, y))
the left function was not part of the definition of the problem
left is not a function; it is a parameter of type Int within the anonymous function (left: Int) => left + right returned by the operation methods. The test should not call a variable like left as if it were a function.
I think it is a problem of the test
Loading more items...