I'm having the same problem for the Ruby version. Cannot get any helpful info from the error messages and there are not Sample Tests either.
Edit: managed to solve it in the end.
The problem was that all error messages are supressed or whatever, so even though my code had errors unrelated to the output, they were not displayed properly.
Instead I got messages of the type Expected: "binary string", instead got: "Not a integer" even though the error could be something completely different, such as an undeclared variable.
This made the debugging very difficult so it took me a while to even understand that the fitness method returns a rational...
I'm a total noob at this. Would someone please tell me how this works? I've tried googling colon and questionmark, but I haven't found a satisfactory explanation.
I'm having the same problem. I feel like this kata isn't very specific in many ways, and it's driving me nuts.
Did you ever get a solution? Even when I edit my run functions return with to_i (for ruby), it still gives me
exactly the same thing. It's really frustrating since I'm not sure what the attempt test is even doing.
I'm having the same problem for the Ruby version. Cannot get any helpful info from the error messages and there are not Sample Tests either.
Edit: managed to solve it in the end.
The problem was that all error messages are supressed or whatever, so even though my code had errors unrelated to the output, they were not displayed properly.
Instead I got messages of the type
Expected: "binary string", instead got: "Not a integer"
even though the error could be something completely different, such as an undeclared variable.This made the debugging very difficult so it took me a while to even understand that the fitness method returns a rational...
WTF? How does that even work?
Gz on the clean solution, btw
Thank you!
So it is an inline conditional... here is an article explaining it better than I could.. :)
https://www.natashatherobot.com/ruby-shorthands-if-then-else/
I'm a total noob at this. Would someone please tell me how this works? I've tried googling colon and questionmark, but I haven't found a satisfactory explanation.
Fixed.
hi, plz, see the issue at the top (maybe the python version will need an update too) with:
puts differentiate( "x-66", 1)
returns 0 instead of 1
confirmed (note: ruby)
I think there is a bug in the ruby implementation as when the random test I get the following error:
expected '0' got '1'... when I looked into this the error was caused by the equation "x-66" with a point value of "0"
Unless I am very much mistaken the differential of x is 1 not 0. Please update as required.
I'm having the same problem. I feel like this kata isn't very specific in many ways, and it's driving me nuts.
Did you ever get a solution? Even when I edit my
run
functionsreturn
withto_i
(for ruby), it still gives meexactly the same thing. It's really frustrating since I'm not sure what the attempt test is even doing.
I am getting a very annoying and totally unexpected error:
I have no idea why I am getting this or what is causing it. I feel like I have followed the instructions, any help would be appriciated.
Also, I why does the ruby imnplementation need to use an integer representation, but the test output want a string..
If you want to visit the towns...
I agree, the lack of this test compromises the usefulness of the kata. Although I guess with over 1k completions you can't modify the tests anymore!
The "expected" is what you must get. In all languages the last test gives the same result and many guys passed it without problem.
The following test could be added for completeness:
As currently code can that passes all your tests can fail this one. :P
Loading more items...