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.
This comment is hidden because it contains spoiler information about the solution
Description:
But there are no empty arrays in the tests. That's too bad. Because in this case solutions with reduce would not work.
The reason of your problem is that you mix up, and seem to miss the difference, between numbers and digit characters. When you do
odd = [1,3,5,7,9]
, then the listodd
contains 5 numbers: 1, 3, 5, 7, and 9. When you donumber = list(str(sum(arr)))
, thenumber
list holds characters, for example:'1'
,'3'
,'5'
,'7'
, or'9'
. That's why when you donumber[-1] in odd
you get no results: because for example'5'
is not in[1, 3, 5, 7, 9]
.5
is, but'5'
is not. You need to find out what's the difference between'1'
and1
, or between'7'
and7
.Thank you for the solution
This comment is hidden because it contains spoiler information about the solution
Because it is not correct.
Without seeing your solution we do not know why it is not correct.
Why my solution doesn't work?
I disagree, checking a number's parity is 8 kyu, checking the parity of the sum of all elements in an array is 7.
too easy for 7 kyu
Thanks!
Approved
its 8kyu, not 7
I think it's okay to keep different types as inputs but the description is really off
in context of Haskell seems like a literal requirement for the arg to be
[Integer]
typeThere should be Haskell-specific description clarifying that input is a list of
Integral
derivativewouldn't it be fine if simply defining the type in the default code? it's quite odd for the solver to specify the type when they don't .. know what it should be
Yeah, that's nowhere remotely close to what the kata is supposed to test, which is a problem in itself.
Loading more items...