Ad
  • Default User Avatar

    The reason is that 0.9 times the total sum results in a 10% deduction from the aforementioned sum.

  • Custom User Avatar

    Nothing is broken, your switch conditions are wrong:

    Purchases of 2 or more litres get a discount of 5 cents per litre...

    so I know im getting the discount correct

    No, you're not, see the second sample test, print discount value.

  • Default User Avatar

    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)