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.
Ok I adjusted the prices to integers so the problem should be gone. Thanks
Try
[0, 10, 0, 1, 0], 13.5
.1.2 + 1.2 + 1.2 + 1.2 + 1.2 + 1.2 + 1.2 + 1.2 + 1.2 + 1.2 + 1.5 = 13.499999999999998
You would have to create some test cases (for example some many random tests) where total price is equal to the budget, use your current reference solution in tests, and try to solve it with my solution based on fractions. Depending on some factors, my solution might not pass because your reference solution would produce inaccurate results and would reject my solution.
Some info can be found in this article and articles linked from there.
Ok i deleted JavaScript, adjusted my tests so return False isnt a solution anymore, I also changed shoppingList and x. Could you tell me what do you exactly mean with roundig issues.
return False
passes all random tests.x
is needed to weed out solutions which have rounding issuesx
is not great (andshoppingList
does not conform to Python naming conventions).Please take a look at Python translations of Leap Years or Even or Odd for some ideas about organization of test suites.
Now there are random tests
There are no sample tests, or random tests. And only 2 fixed tests.
Please read the kata authoring guideline before creating a kata, period.
Thank you for pointing that out.
I now added random tests.
Thank you for helping me improve this Kata.
I cannot fathom why individuals resort to cheating at Codewars. Such conduct is inconceivable and should not be condoned.
I know both individuals, and I can state without doubt that they are the most deceitful individuals I have encountered.
When I hit "attempt", it shows an error:
Can you please fix that?
Thank you for completing my first Kata and for your comment.
I updated the Kata regarding that issue.
Hi, why did you cheat on the only blue kata you completed? This is what you submitted, which is exactly the same as a very commonly copied solution.
You also submitted this as your only purple kata solve, which is structurally the same as another submission by another new user within the same PxC clan, at roughly the same time frame.
Please don't cheat together.
Hi, why did you cheat on the only blue kata you completed? This is what you submitted, which is exactly the same as a very commonly copied solution.
Reality issue: clocks don't go from
1
to24
, but from0
to23
. Also description saysActual tests contain
current_time = 0
inputs.Loading more items...