More tests for different cases are needed, I guess. At least for Python. Sometimes Kata allows me to submit a wrong solution, sometimes - not
Nice kata, but could have been worded more clearly.
Uses exact equality on floats.
This comment is hidden because it contains spoiler information about the solution
See the quotes in your answer, the expected value is a number.
which is obviously incorrect, isn't it?
Got this result expected '5.65' to equal 5.65
expected '5.65' to equal 5.65
Approved
python new test framework is required. updated in this fork
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/203. Please join the discussion to help us identify duplicate kata and retire them.
C Translation (author inactive).
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:
Purchases of 2 or more litres get a discount of 5 cents per litre
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:
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.
Loading collection data...
More tests for different cases are needed, I guess. At least for Python. Sometimes Kata allows me to submit a wrong solution, sometimes - not
Nice kata, but could have been worded more clearly.
Uses exact equality on floats.
This comment is hidden because it contains spoiler information about the solution
See the quotes in your answer, the expected value is a number.
which is obviously incorrect, isn't it?
Got this result
expected '5.65' to equal 5.65
This comment is hidden because it contains spoiler information about the solution
Approved
python new test framework is required. updated in this fork
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/203.
Please join the discussion to help us identify duplicate kata and retire them.
C Translation (author inactive).
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.
Loading more items...