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.
@Johan - I've raised the issue above; it seems like there are 4 threads for this same discussion so posting here to close out the sub-thread.
Proof would be a generated testcase and an expected return value that are bullsh!t, separately or in combination. Your, or anyone's, solution code has nothing to do with that. Please stop posting solutions.
@Johan I raised an issue myself above.
@joshred83 - the idea is to use data from tests to show that the error is with the kata; if you read my post hopefully it's clear what the "reporting" should look like.
This comment is hidden because it contains spoiler information about the solution
Hey @joshred83 - it seems you had the same thing as @PDrich101 so see my comment to him just a few minutes ago:
https://www.codewars.com/kata/57c6b44f58da9ea6c20003da/discuss#63a60d1d9803f25147a80faf
TL;DR - basically don't use Numpy
I tried so hard to tell you how to post a useful
Issue
. And you gave us nothing to work with.If it doesn't say "post an
Issue
", do not post anIssue
. If you do post anIssue
, include relevant information. Input, actual output, expected output, and language, at least. There is no need to post your code if the kata really is wrong.Using prod from the math module solved it for me.
Don't think. Prove. Closing.
Please markup your code correctly. Please state your language as Python (?).
If you can positively confirm a case where inputs lead to
product(nums) <= 0
(nums
includingmissing
), please raise anIssue
because the kata has a problem. Be sure to post relevant information with your issue. Please consult the Troubleshooting Guide raising that issue; it tells you what, how, and what not, to do.Wikipedia: The geometric mean applies only to positive numbers. So the adjusted input should at least multiply to a positive number, or the random generation in
$LANGUAGE
is broken.Also, no comments and no docstring, how terribly unfortunate.
At least my solution doesn't require any workarounds for edge cases (like some other solution I've seen) and doesn't break with long enough strings (like yours one).