Ad
  • Default User Avatar

    '<solution.Vector object at 0x7fb67b7f3dd0>' should equal '(1,2,3)'

    What is this issue? Its working fine on IDE

  • Default User Avatar

    Trick question regarding the initial wordset. Katas should be confined to testing knowledge of python rather than tricky stuff like the initial word List

  • Default User Avatar

    The tests have a problem! agreed

  • Default User Avatar
  • Default User Avatar

    Hi, Thanks for your feedback. Fixed. I've added the import numpy as np line to the initial solution

    Also, I'm going to unpublish this for the moment until I have random tests working. Was the description easy to understand?

  • Default User Avatar

    Hi,

    I've published another Kata on extracting a closed contour from a Black and White image. I have code that generates images with random curves and contours, but I do not yet have any random tests in the Python Code wars testing framework, since I first wanted your comment on whether this Kata has any chance at all in being accepted. If you think this Kata has a decent chance of being accepted, then I will start generating random test cases using the codewars framework.

    The kata is here https://www.codewars.com/kata/5ed6327fc66c2b001630fe37/python

    Thanks and Best wishes

    Note: I've unpublished this for the moment until I can add the random tests. Are you still able to see the Kata?

  • Default User Avatar

    Please add the tag recursion as well since Recursion can be used to great advantage here.

    Those who are looking particularly for recursion problems will find this one

  • Default User Avatar

    Am I the only one confused by this? :-)
    Maybe I'm over thinking this.

    I feel what you really need to do is add extra information to number 4 as that is the source of confusion.
    If the value of both die are the same and he lands on any square other than 100, then that player will have another go. However, if he lands on 100 with value of both die being the same, then the player wins and does not have to roll again.

    Thanks :-)

  • Default User Avatar

    Hi @adrian.eyre

    Here is a statement from the problem description

    Return Player n Wins!. Where n is winning player that has landed on square 100 without any remainding moves left.

    1. If the value of both die are the same then that player will have another go.

    So, if he rolls (1,1) to get to 100, it means there is a remaining move left, no? If not, the problem statement is confusing

  • Default User Avatar

    in one of the random tests, here is the output

    Player 1 is on square 98, test passed

    Player 2 is on square 85, test passed

    Player 1 is on square 100 should equal, player 1 wins. ---> Here there is clearly is an error in the test case

    I eventually passed all the test cases by modifying my code, but it goes against your instructions in the problem statement that a player wins only if he gets to 100 without having any moves left over

    If player 1 was originally on 98, then the only way he can get to 100 is by rolling (1,1). Since (1,1) implies that he has a remaining move, player 1 does not win even though he is on 100.

  • Default User Avatar

    Is it possible to write tests in a way that they accept answers within a particular range?

  • Default User Avatar

    You could try to make the time step adaptive, i.e. ask the user to figure it out under the condition that output be within 1% of the correct answer.Obviously, you'd have to write the tests in a way that they accept answers within a particular range. Is it possible to do that?

  • Default User Avatar

    Oh okay. Thanks for the clarification. So as not to create too much pointless work for the moderators, I have unpublished the Kata.

    Best Wishes

  • Default User Avatar

    Hi, Thanks for the comment. I think the conditions that require the two divisors to be relatively prime and product up to the input provide a reasonable deviation from what's already there. I've looked at the other katas and this feature does not seem to be there in those. Therefore, I feel it's not that close to a duplicate.

    By random tests, do you mean that the test cases are to be generated on the fly? i.e, different users will see different tests?

  • Default User Avatar

    Not a classic recursion problem. You dont really use the recursion feature of python to solve this

  • Loading more items...