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.
I still do not understand:
[1, 3, 5, 7, 9, 11, 13, 15]
,N = 4
True
True
True
added:
I think I understand now! Thank you!
Misleading description! (python lang)
From the description: "you need to find consecutive, odd numbers whose sum is equal to the cube of a given number."
Using the example
N = 4
, as a result, all tests pass, except for the length test:sum([1, 3, 5, 7, 9, 11, 13, 15]) == 4 ** 3
Incorrect length for n = 4: 8 should equal 4
sum([31, 33]) == 4 ** 3
Incorrect length for n = 4: 2 should equal 4
There is still 1 option left for
N = 4
:[13, 15, 17, 19]
. Judging by the tests, this is exactly what is needed, how should I guess about it?This comment is hidden because it contains spoiler information about the solution
Just need to check equivalence instead of equality:
because the type of the variable must also be taken into account.
A good task, but your solution (Python lang) does not provide all possible options, for example
print(eq_all([0, False]))
will returnTrue
although it should beFalse
. It would be nice to include something like this in tests.Wrong description!
This is not the original comment! The original was removed as it I reconsidered all of the above and changed my judgment, I was too hasty. I worked on the description of the task of this kata. And I also wrote about this in the first answer.
Thanks for your feedback. =)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This is not the original comment! The original one was removed because it did not solve the problem!
On business:
Thanks for your feedback! =)
“This would not fly for test”, but the tests have already worked, maybe with a single test in the group, division into individual ones is not necessary, I’m not sure. However, from a “clean code” point of view, I agree that separate tests should be allocated in the group. Already fixed it, thanks for the note.
Thanks for your feedback. In random tests, lists were actually passed as arguments instead of strings. This was not done intentionally, my oversight. Already fixed it. =)