Ad
  • Default User Avatar

    @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.

  • Custom User Avatar

    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.

  • Default User Avatar

    @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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    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

  • Custom User Avatar

    I tried so hard to tell you how to post a useful Issue. And you gave us nothing to work with.

    • Please follow the Troubleshooting Guide. Carefully.

    If it doesn't say "post an Issue", do not post an Issue. If you do post an Issue, 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.

  • Custom User Avatar

    Using prod from the math module solved it for me.

  • Custom User Avatar

    Don't think. Prove. Closing.

  • Custom User Avatar

    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 including missing ), please raise an Issue 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.

  • Custom User Avatar

    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).