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.
'<solution.Vector object at 0x7fb67b7f3dd0>' should equal '(1,2,3)'
What is this issue? Its working fine on IDE
Trick question regarding the initial wordset. Katas should be confined to testing knowledge of python rather than tricky stuff like the initial word List
The tests have a problem! agreed
Thanks :-)
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?
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?
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
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 :-)
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.
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
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.
Is it possible to write tests in a way that they accept answers within a particular range?
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?
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
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?
Not a classic recursion problem. You dont really use the recursion feature of python to solve this
Loading more items...