The issue is not with his code. Look at the inputs he is entering. Your tests are (sometimes) saying that for inputs daysIn(12, true) the answer should be -1 which is obviously wrong.
If you're interested in authroing kata, you really should start by reading the full documentation. Publishing this kind of kata, you'll only get frustrated with the feedback. https://docs.codewars.com/authoring/guidelines/
ah right, I didn't think about checking the types.
note that input validation, these days, isn't welcomed in new kata.
I can suspect that is the problem with implicit conversion
daysIn(12,true)
always gets 31, whiledaysIn("12",true)
gets -1, as it's invalid inputPS. I did change that test case though, since it's not really providing any value to solvers
The issue is not with his code. Look at the inputs he is entering. Your tests are (sometimes) saying that for inputs
daysIn(12, true)
the answer should be-1
which is obviously wrong.Your code passes when I run it, I am not sure why you are getting errors..
Thank you for your feedback, going to look more into it, and learn more about guidelines.
even better... in the first part of the tests...:
12 true
expected -1 to equal 31
12 true
expected 31 to equal -1
=> !??
Hi,
pi d^2
If you're interested in authroing kata, you really should start by reading the full documentation. Publishing this kind of kata, you'll only get frustrated with the feedback.
https://docs.codewars.com/authoring/guidelines/
Cheers
B is 'straight flush', combining straight with flush (it's the second strongest hand on paper, after royal flush)