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.
Fixed in latest fork
you can use stof() or stod() functions they both can handle -ve signs as well as decimal points.
Math.sign(num) will return -1 if the number is negative I think.
For the warning: you should add a return after the last
else if
branch or simply useelse
.i think it'll be so much easier to identify where we went wrong if instead of returning "Value is not what was expected", it returns the result of the code. I'm using javascript and i practically copied and altered my python code that had worked before but it sucks not knowing where you messed up at in the code you know
Whooooooooosh
stuff like this makes me feel dumb for overthinking
oml im so dumb thank you for piointing that out
Not a kata issue, check this:
Python:
I was able to finally complete the code to this Kata...but when I attempt it, it comes up with the failed even though
it is correct. Why is this?
ex:
{'Nickles': 0, 'Pennies': 4, 'Dimes': 0, 'Quarters': 1} should equal {'Nickels': 0, 'Pennies': 4, 'Dimes': 0, 'Quarters': 1}
Though I failed all of my test cases even if they are correct??
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
'Looks like you've solved it'
I have been lied to my whole life is what y'all are saying. That a new century doesn't start on a "xx00"!! instead on a "xx01"!!
...
all of my living years all lied too
...
You can always check test input by printing it: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#how-can-i-see-which-input-causes-my-solution-to-fail
Loading more items...