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.
Yes I was not trying to tell what is or isnt an edge case, I was just trying to explain the reason why most katas need fixed and random tests.
Unfortunately, no one can delete the kata. I know there is a 'delete' button, but as soon as anyone solves the kata it cannot be deleted anymore. (It is a bit strange, I know)
But it has already been automatically retired because of being too similar to other katas, so it won't show up in the kata list anymore.
You are right here, many older katas tests in Codewars are very bad. But this is why the beta process now is so strict now, to make sure that all the issues are already solved before approval so we don't get even more bad ones. And we are working on fixing the older ones, but it takes a long time :)
@Kacarott
My mistake, I used wrong words. The question was not about edge cases or not. It was about fixed tests in attempt part or not. In most cases I would say it's necessary to take fixed tests in attempt part and I understand your arguments. But in this concrete case I think it's not, because my tests do not check edge cases at all. I don't think that A = [[0, 0, 0], [0, 0, 0], [0, 0, 0]], x = [0, 0, 0] is an edge case, because if the algorithm works this case should also work. Yes, we can argue about it, but I think it's enough for this kata and it is also better than many other tests in codewars where I did mistakes and got nevertheless points for the katas.
Thank you that you gave me clear answers to my questions.
Can you delete this kata now, please.
@FArekkusu
Because you wrote that's the same problem as the one rowcased described and rowcased maked his problem as resolved.
I sill don't get the point. The are a lot of katas (not Beta) where katas spoil other katas. In my oppinion you try to find a reason why this kata is a bad idea. May be I am wrong, but it's not important anymore.
Please delete this kata. I tried it before, but I don't have permissions.
??? But they aren't? The attempt part only contains 20 random tests. If a user solution for some reason failed a test like
A = [[0, 0, 0], [0, 0, 0], [0, 0, 0]], x = [0, 0, 0]
then they can just ignore it because the chance of that exact test appearing in the random tests is incredibly rare.@Kacarott
That makes sense.
This makes sense, too. This explains why the tests works without import.
No I don't. In my case all fixed tests are available for solver in sample test. They can see them, use them and extend them. And edge cases are testet in attempt part. The solver are not able to ignore the edge cases and solve the kata anyway.
No, you haven't addressed that point at all. I don't understand based on what you've come to this conclusion after I literally said "a different part of the description became wrong".
codewars_test
astest
is a convention, importing the test framework is a requirement.General-case solutions spoil the other katas, and there're already quite a few general-case solutions submitted here. Even if a mod hides them all, you can't stop people from submitting those unless you forbid importing specific/any libraries.
Importing in any way you like does not include choosing to not import. It means you can choose to do
from solution import *
orimport solution as foo
orfrom solution import bar as x
if you wish, but you must still import.It works currently without errors, to support older katas which are not yet updated. But all katas should follow the guidelines regardless. It could be in the future that it will be changed to only work with imports, at which point your kata will be broken.
Almost means all katas, with a few unique exceptions, for which random or fixed tests simply do not make sense. For example.
The sample tests are just for user convenience. The solver does not have to run them in order to pass the kata, which is why they are not relevant here (they are important in a kata, but not the topic of the issue). If a sample test contains an edge case, for example, and the full tests do not contain that edge case, then the solver can simply ignore it and solve anyway. See the issue?
So this is already solved.
Why is it a fact? In the guideline I found:
„For simplicity, through the rest of this article it's assumed that the codewars_test module is imported and aliased as test with the following statement.“ (your point)
But I also found:
„This is a convention used in many Python kata, but it's not a requirement, and authors can choose to import the module in any way they find suitable for them.„ (my point)
I think it's not clear.
Can you explain why it is a fact? And can you also answer my other question related to this: „Why? It works without errors.“
What does „almost“ mean in this context? Where in the guideline can I find that sample tests are irrelevant and fixed tests should always be in „Test Case“-Block and not in „Example Test Case“-Block? And what is the sense behind it?
I still don't get the point. The large part of all katas in codewars are trivial map, filter and reduce tasks. Yes, it can be solved with the same code, but only if you solve it for the general case. In this kata it is not necessary to solve the general case. The solution of this kata (special case) cannot be used for the other kata (general case). So it's not the same problem and therefore no duplicate.
My argument is that this kata is easier to solve for beginners, because they don't need to solve the general case.
Because you made the random input generator create such arrays? Also, a different part of the description became wrong after you'd fixed the issue above.
Yes.
The fact that you have to import the test framework.
Final tests (almost) always must include fixed tests and random tests. The contents of the sample tests are irrelevant here.
Even if we assume that it's okay for this kata to exist because it's a special case simplifying the problem, it can be solved with exactly same code as those other matrix multiplication katas, so they'll inevitably spoil one another. And in that case I can just as well say that this is trivial map/filter/reduce task lacking any novelty (or considering you can solve it like this, it might be more appropriate to say that this kata is doing basic arithmetics).
Is this the same issue like "Sample tests expect a different return format than the ATTEMPT tests." and "^ The same issue is true for the function output"?
Solved.
Sample tests expect a different return format than the ATTEMPT tests.
What did I miss here? Quote[Imports]: „This is a convention used in many Python kata, but it's not a requirement, and authors can choose to import the module in any way they find suitable for them.“
What did I miss here? The „Example Test Case“ has fixed test and the „Test Case“ has only random tests. I think its enough for solving the problem and this kata consists of fixed tests and random tests. Why is this not enough? And where did I break the guidelines?
Why has the second argument (of what?) has the form [[x], [y], [z]]?
I don't get the point. Why is it important, that you understand my intention? Why is my completed kata list important?
Loading more items...