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.
Kata premise is completely flawed: Why does
partition(101, 50)
expect[50, 51]
only?[101]
is also a valid result, sincesqrt(2n)-(3minsize)
is negative in this case.Error messages are not very useful:
Shouldn't use
test.expect()
stated it explicitly in description now
corrected in description
I would definitively specify that the
sum
of the output should be the value.I really like it otherwise, short but pleasant.
test.expect(len(partition(50, 1)) >= 7, "length should be 7 at least")
According to the description, the list must be [strictly] longer that 7.