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.
when submitting Verify has a bug:
TypeError: lstrip arg must be None or str
which seems to be caused by an invalid second argument to lstrip
Tiny typo in the template: it should be "delimiter", it is "delimeter"
You could add a testcase, where padding style is ^ and width is lower than the length of the given string.
The faulty tests are such that a string supposedly fits in a too small bath.
(atleast I haven't seen it the other way around)
Python3 random tests are buggy.
The random test cases are missing a space after the operator.
I personally think that there shouldn't be spaces in the OPERATORS dictionary, but that's up to you.
god I feel bad for my solution XD
The list of imports feels longer than actual code.
But anyhow, thanks for the kata, it has been fun!
Sounds good to me.
Regarding the 2nd bit, I can certainly agree that exp is usually defined over R. But if you don't have a mathematical background, this is something you'll easily miss and would lead to frustration.
There are 2 small typos in the description, it should probably read "decomposition of a number".
Exactly like others said, in the current state this makes not much sense.
I really don't like that this kata makes you eval a string from an untrusted source.
And if that wasn't the point of this kata, it should precisely state that you're supposed to build some kind of calculator / expression evaluator.
Depending on the difficulty you're aiming at, I would include some testcases for larger numbers of dice to exclude solutions that just brute-force enumerate all possible combinations and then check whether they give the desired sum.
If you were aiming for a lower difficulty, ignore that ;)
Thanks for the nice challenge!
PS: I would also like to see python3 support
Sorry for my misleading comment.
It's not a bug in my or the other peoples implementations, it's a bug in the test case.
There shouldn't be any replacement chars in the resulting string if there aren't any in the given alphabet.
If only we could use python 3 for this kata >_>
It's some kind of bug with unicode handling in python 2.
@gambith The method implemented by Zantyr and me allows for much larger values of n without overflowing.