When I first made the task, I noticed that about 80-90% of the random tests will result in `False`. I wanted to, kind of, solve it to make the numbers of valid and invalid serial numbers about equal to each other. But at the end, I did not seem to care. Now, it's all done.
As for the helpful message, added that one as well.
As this is my first ever kata, the issues were inevitable. Thanks for your suggestions.
The whole "formatting the answer" part seems completely unnecessary for a mathematics kata.
You want to return a formula without the basic math notation? What are you, living in the XVI century, still writing is equal to instead of =? It is necessary to make the output nice and clean, which is what mathematicians, usually, target.
What’s wrong with just returning a sequence of triples, like [(2, 3, 4), (-1, 1, 1)] to represent 2 sin(x)^3 cos(x)^4 - sin(x) cos(x)?
Actually yeah. Screw the system, that we've been adapted to for centuries. Let me write it in my notebook as cos(2x) = [(2, 2, 0), (-1, 0, 0)].
You can't just leave it that way 'cause, for primarily mathematicians, this is very confusing. With your logic, for example, this kata doesn't deserve anything over 6 kyu (though I gotta admit, that it is overranked).
I'm going to be completely honest here, I still can't solve this kata because of the issues with my implementation of Chebyshev's formula. However, I don't blame the kata itself for being that way. It's way better for me to analyze my outputs in the form of - 1 - 8 cos(x)^2 + 8 cos(x)^4 rather than [(-1, 0, 0), (-8, 2, 0), (8, 4, 0)] and I'm sure the majority of people would relate to that.
Sorry, I misunderstood your first post. I thought you were saying the author should add a warning to the description that warns users not to print every input. I see now that you meant that the tests should not output the full contents of very large arrays.
I respectfully disagree that this makes the Kata worthless and unsalvageable. What's wrong with authoring a Kata which strikes some "middle ground" between your typical beginner Fibonacci Kata and some ultimate generalized version of a Fibonacci Kata understood mostly by math majors and postgraduates?
By this logic I can author a Kata on the "theory of theories" in mathematics and that would make pretty much every other existing mathematics Kata on this site a duplicate ;-)
If they're immutable, they're also fixed size. I think this is a case where there's no right answer and it's up to preference. Since the types of the inner elements are heterogeneous (for the clues), and that the sequences themselves represent finite sets of data that will never change since the input they're based on will never change, this ticks both major boxes to justify using a tuple. The only gains you get by returning a list of lists is that the function's user will be allowed to modify the returned lists afterwards, but again, those are very subjective API design choices. Again, since the answer is obvious even before runtime, to me it semantically reads like named_tuple('clues', 'clue1, clue2, clue3, ..., clueN')
As this is my first ever kata, the issues were inevitable. Thanks for your suggestions.
You want to return a formula without the basic math notation? What are you, living in the XVI century, still writing
is equal to
instead of=
? It is necessary to make the output nice and clean, which is what mathematicians, usually, target.Actually yeah. Screw the system, that we've been adapted to for centuries. Let me write it in my notebook as
cos(2x) = [(2, 2, 0), (-1, 0, 0)]
.You can't just leave it that way 'cause, for primarily mathematicians, this is very confusing. With your logic, for example, this kata doesn't deserve anything over 6 kyu (though I gotta admit, that it is overranked).
I'm going to be completely honest here, I still can't solve this kata because of the issues with my implementation of
Chebyshev's formula
. However, I don't blame the kata itself for being that way. It's way better for me to analyze my outputs in the form of- 1 - 8 cos(x)^2 + 8 cos(x)^4
rather than[(-1, 0, 0), (-8, 2, 0), (8, 4, 0)]
and I'm sure the majority of people would relate to that.Moreover, there are less than 81 valid outputs, this makes the problem worse.
Is this for Python, I don't see such logs?
Sorry, I misunderstood your first post. I thought you were saying the author should add a warning to the description that warns users not to print every input. I see now that you meant that the tests should not output the full contents of very large arrays.
There are tons of kata which pass large arrays as inputs, are you saying this warning should be added to all of them?
How???
thanks
Fixed
it's in python now! i'm looking forward to seeing ur solution xd
You know what else is free too? --> Authoring katas on CW in any spoken language of your choice (The rules prohibit this but not the system ^^)
Done in above fork
I respectfully disagree that this makes the Kata worthless and unsalvageable. What's wrong with authoring a Kata which strikes some "middle ground" between your typical beginner Fibonacci Kata and some ultimate generalized version of a Fibonacci Kata understood mostly by math majors and postgraduates?
By this logic I can author a Kata on the "theory of theories" in mathematics and that would make pretty much every other existing mathematics Kata on this site a duplicate ;-)
This comment is hidden because it contains spoiler information about the solution
If they're immutable, they're also fixed size. I think this is a case where there's no right answer and it's up to preference. Since the types of the inner elements are heterogeneous (for the
clues
), and that the sequences themselves represent finite sets of data that will never change since the input they're based on will never change, this ticks both major boxes to justify using atuple
. The only gains you get by returning alist
oflist
s is that the function's user will be allowed to modify the returned lists afterwards, but again, those are very subjective API design choices. Again, since the answer is obvious even before runtime, to me it semantically reads likenamed_tuple('clues', 'clue1, clue2, clue3, ..., clueN')
Loading more items...