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.
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 (
assertApproxEquals
in JS ).If I get
10.00039999999999999999
instead of10.000400000000000001
, I'm still screwed. Rounding instead of truncating just moves this problem by5e-something
.NB:
Math.hypot
gives 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_case
for 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
6
litres with3
- and5
-litre jars:The same goes for
10, 20, 100
case.Maybe you should specify that
C
has to be less thanB
in 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.
unique
is tested againstisUnique
instead of a reference implementation.Function names in Python should be in
snake_case
.The tests expect function to be available as both
isUnique
andunique
.Loading more items...