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.
you need random kind of operations too so you'll have to mix the three batches (and most likely add more kind of tests, see issue below)
Hi,
@property
or not)snake_case
x + kata
can happenkata += x
can happenCheers
It appears I marked my previous question as resolved too soon. :)
Here is a base 10 to base 10 conversion where the reference solution produces trailing zeroes in the fractional part:
Since base 10 to base 10 can be done exactly, there is no possibility of more nonzero fractional digits coming after that. So the reference solution should not produce zeroes at the end.
The issue is not fixed. Don't resolve anything just because you think it's working.
Without stripping zeros:
'565181118393.1542000000' should equal '565181118393.1542'
. With stripping zeros:'230C1040C39.B885CB0CC' should equal '230C1040C39.B885CB0CC0'
.What?
The input should be explicitly provided of type Decimal, str or Fraction. Otherwise, there is possible inconsistency of treating floating point number due to internal representation.
I.e.,
whereas
snake_case
string
Hi,
n>0
is guaranteed (by talking about "only valid" inputs, you cover the 0 case, but not the negative values)Cheers
random tests are with sample tests instead of fixed tests
This sentence is incorrect, and the task is different from what is said here. Also, this has nothing to do with narcissistic numbers.
Python can easily calculate such huge numbers, so the whole kata can be solved by calling
eval
(or converting the strings to numbers and performing exponentiation manually, it doesn't matter). And even if you increase the input range to prevent it, this kata will be a duplicate of this one.both expressions are called *1 in the description.
You get 2 powers in the format (number1^exponent1, number1^exponent1)
hi,
that's a duplicate
and ref solution is most likely incorrectlooks like you already corrected the tests.you should unpublish it.
cheers
Sample tests and fixed tests are inadequate: there are only 2 test cases with expected
x = 0
, which doesn't help ensure that code is at least mostly correct.Loading more items...