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.
python new test framework is required. updated in this fork
The description could be more condensed instead of pasting the whole rulebook into it.
500 random tests is too much, 100 is enough.
I know for this kata it is difficult to change it; but returning different data types is bad practice.
Current input method and rounding requirement is flawed anyway; try this:
The proper method to it is to use
Decimal
object to parse time strings as decimals directly; see https://www.codewars.com/kata/round-and-roundThe implementation of
real_round
provided by the kata is flawed: it doesn't accepts thendigits
optional parameter.Also calling it
real_round
is disgustingly misleading; Banker's rounding is the real round since it's recommended by IEEE standard. The function should be called something faithful and accurate likeround_half_up
.New test framework should be used.
Why do you believe the result could not reach 1000?
Why you generate cases where
p == 1
?snake_cased
, notpascalCased
EDIT:
SERIOUSLY!?? X/
not enough tests
no random tests
the output formatting is just plain bullshit (yeah, this is!):
None should equal 'True, increasing'
None should equal 'True, decreasing'
None should equal False
None should equal False
why add
"True, "
at the beginning? That's non sense. And you should always return the same kind of output. Meaning always strings, not booleans.EDIT²: Sorry for the tone but well, this is really bad. :/