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.
There is no issue; functions in tests are inaccessible to the user in JavaScript.
Something is wrong here..I get the right answer when I print the value before returning, but when the value is returned the return value is not same as the print statement just before that! Btw, the code is in python.
print(distance) - this print right value
return(distance) - the value returned is wrong here!
I'm not insulted, I completely acknowledge that I feel like I'm in over my head a little. Is there any way this issue can be resoved?
It is.
And something has been fixed.
Not in JavaScript it can't; tests are already in a closure. Preloaded can be accessed.
I don't mean to insult, but it looks like both of you don't know what you are talking about.
Usually, we call the 'validation function' the 'reference solution'. That'd be
furthestDistanceTest
in your tests. The original issue has been resolved BTW.I believe this issue is resolved now.
Hi, what is the 'validater definition'?
allow contributors is ticked.
Uses the same name for both the user function and validation function. Also, even if you change the name, the validation function can still be accessed by the user. It needs to be hidden somehow. Wrap the testing logic in a function of its own and move the validater definition inside that function.
( JS, possibly others )
Submit tests are comparing the user solution against itself.
That's rightfully an issue. The tests are comparing the user solution against itself .. :O
And
allow contributors
is off, so only OP can fix this.I noticed I just passed the test using
console.log
I think there is something to be fixed.
Thanks