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.
python new test framework
Python new test framework should be used with assertion messages displayed using the right format
Random tests in JS only generate a fixed range of inputs and regardless of that users can basically hardcode the output since there's only 25 outcomes
Missing example test in description
Should be language-agnostic
People will come from any point on the edge and in equal amounts from each point
(This part is ambigous and requires more clarity)All good!
(EDIT: seems I overcomplicated it a bit... ;o )
You're right, I was wrong, I finally found (or hope so) the issue (
x==0 and x==0
instead ofx==0 and y==0
, grrr...) and the worst was that the same issue was in my own solution, so it passed the tests successfully.This time I think it's fixed.
Thanks to your time and help.
; ) )
Errr...
Presentation: fixed, thanks.
The "[0,0]" thing: sorry, but the problem lays on your side (be sure that I checked for that before posting the issue! ;p ). See below:
So clearly, the input you're passing to the warrior is not what you think it is! ;)
. . . is the message presenting the case ( here danny's position = [0,0] ) . . .
. . . is the error message, it means :
[[0, 0]]
(your output) is the wrong answer and[[-1, -1], [-1, 0], [-1, 1], [0, -1], [0, 1], [1, -1], [1, 0], [1, 1]]
is the expected one. (If danny is in middle of the square every spot around him will be better)I don't understand where the line
Danny: [0, 1]
comes from.It may be a problem of array argument modified somewhere.
I've tried to fix this kind of issue.
Also fixed the Fixed/Random tests titling.
Hope it helps.
; ) )
Python: something seems wrong:
=> even without doing any calculations: how Emily could be at the same spot than Danny?
=> There, I begin to ask to myself if I well understood the task, considering how the expected result seems... """odd""". :o We're supposed to find the coordinates where Emily will get more customers than Danny, right? (or at least, the maximum possible?)
EDIT: BTW, edge cases should be part of the fixed tests, not only the random tests (and those (the random tests) are not announced: that is quite surprising when encountering an issue and not finding it at the same place or even finding another one on the next run!)
All sorted now, looks good :)
That sounds awesome - I can't seem to find it though. Just went through your suggested link and looked in the translations list. Could you resubmit it?
This comment is hidden because it contains spoiler information about the solution
You're welcome!
That makes sense - I have changed both now. So it always returns a nested array, and all the answers are coordinates.
Thanks for you help! :)
That, and in the case of there being one answer, also returning [ [x,y] ]. Always returning an array of coordinates, where coordinates is an array of length 2 (would be a 2-tuple in languages that have them). This makes it a lot easier to work with the answer afterwards.
Loading more items...