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
the C++ test case
(w = 86.7, h = 1.7)
was problematic because the orer of operations affected the result. removed.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
.Not a kata issue, check this:
'Looks like you've solved it'
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
Read this https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution if you require more help, follow the instructions on how to post your code. You're doing something wrong.
papi_jean why are you answering something completely unrelated to him/her?
just_noodling_along google
default arguments
Someone commented on mine: "Because you try to apply a string method to a number."
Though I'm still confused ha!
Read all, but the last bullet point somehow applies to you: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#when-i-print-my-answer-it-looks-exactly-the-same-as-the-expected-output-yet-tests-fail
Your code returns
name
instead of the right string.