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.
The reason is that 0.9 times the total sum results in a 10% deduction from the aforementioned sum.
This is probably a level 7 kata I think. Also some solutions use 0.9 for percent, when 10 (0.1) is asked for. Is there a reason for this?
All border cases should be tested, 2, 4, 8 and 10 litres in fixed tests in all languages.
Not a kata issue, one of your conditions is wrong:
You're doing a 50 cents discount. And because border cases aren't tested your code passed.
Nothing is broken, your switch conditions are wrong:
No, you're not, see the second sample test, print discount value.
Yeah this is broken, especially for a level 8 kata
The formula is simple. I am using pattern matching without any fancy stuff, so I know im getting the discount correct
I can't pass all the tests, tweak the rounding and one test passes another failes, tweak it again and different tests pass/fail
Hey @yogabija - I just solved this kata to answer your query, and I had the same error as you.
It turns out that in the description, there is this line:
"However, let's also include 10% wiggle room (deducted from the candidate's minimum salary) in case the candidate is a rockstar who enjoys programming on Codewars in their spare time."
This "10% wiggle room" means, for non-native speakers, that the developer will accept to lower/reduce his salary by up to 10% of its amount. So, if his given Minimum Salary is $200, then his "Real" Minimum Salary is actually $200 - 10% = $180.
I hope this helps a bit (I agree with you that the description/kata is a bit confusing)
Okay this test I think is broken!
Candidate: 190000
Job: 171000
Test Failed
Expected: True
But was: False
Also one of the tests which fails should not be failing because the test is wrong/