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.
In Python,
bool
is an integer type:I think that tests using
bool
should either expectTrue
, or be removed for this language.Sure thing!
Test framework update
Old test framework was only used in sample tests btw. I mostly just copied fixed tests there.
Test framework update
This test is incorrect from grammar perspective:
In Russian,
тысяча
is short forодна тысяча
. Just as withодна целая
, when talking about one of something, you have to consider gender. Interestingly,1 000
is feminine,1 000 000
,1 000 000 000
and onwards are masculine.Acceptable versions:
Fixed (8 years later :D)
Fixed
Fixed
Upd:
print_tree
function and smaller random tests to simplify debugging issueConcerning the random tests issue, in the current version the "positive" tests generate giant all-male family trees that contain lots of seventh sons for obvious reasons. This allows many invalid solutions to pass tests.
On the contrast, the new random tests generate familty trees where seventh sons of a seventh son appear somewhere in the tree, often behind a female anscestor.
json
module made visible only for Pythonimport json
added, formatting updatedThe tests are fine, just solved it. As some other 14000 people before me.
Codewars kata are rigorously tested by multiple users, 99% of the time you can be sure the problem is not in the tests.
You can use
print()
to print any data you need to stdout.This comment is hidden because it contains spoiler information about the solution
What exactly would you change?
Loading more items...