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.
Rust translation
I am unsure as to whether it is checking whether the type is equal or the content of whatever datatype is equal. For lists it wants the content to be equal, but for the counters it simply asks for the type to be the same, not the content. Please clarify this. Thanks. Interesting kata.
needs to be rewwritten with the new framework
Please do not round ( or truncate ) floating point values. Compare with a margin for error (
assertApproxEqualsin JS ).If I get
10.00039999999999999999instead of10.000400000000000001, I'm still screwed. Rounding instead of truncating just moves this problem by5e-something.NB:
Math.hypotgives different answers thanMath.sqrt.Sorry, it's a duplicate of Bug's life: https://www.codewars.com/kata/bugs-life
Good attempt. Continue trying and you'll be publishing good katas in a short time.
snake_casefor python function naming, not PascalCase.And why the fuck the rounding? That leads to situations like this:
-> just... "lol!" x/
=> Use proper float testing:
Test.assert_approx_equals(act,exp,precision)I don't know in what universe you live, but here, on Earth, I can measure
6litres with3- and5-litre jars:The same goes for
10, 20, 100case.Maybe you should specify that
Chas to be less thanBin the description?Apparently,
b > a. But this is not specified. ( The example solution would failA = 5, B = 3. )Also, there is no "demand jar"
C, there is only a "demand" C. Giving us the jar would make it a bit too easy .. :Pwarning, your random tests will rarely generate a True answer. Don't rely on luck, create a random execution in the loop that will automatically expect True:
This comment is hidden because it contains spoiler information about the solution
There is only one possible solution within the character limit.
That is not the making of a good kata. There should be room for creativity.
Changing the length restriction to make it artificially harder to avoid downvotes? What a smart boy.
This is not new.
uniqueis tested againstisUniqueinstead of a reference implementation.Function names in Python should be in
snake_case.Loading more items...