• ###### valera__martcommented on "Odd or Even?" kata

This comment is hidden because it contains spoiler information about the solution

• ###### Investrumcommented on "Odd or Even?" kata

Description:

If the input array is empty consider it as: [0] (array with a zero).

But there are no empty arrays in the tests. That's too bad. Because in this case solutions with reduce would not work.

• ###### hobovskycommented on "Odd or Even?" kata

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 list `odd` contains 5 numbers: 1, 3, 5, 7, and 9. When you do ` number = list(str(sum(arr)))`, the `number` list holds characters, for example: `'1'`, `'3'`, `'5'`, `'7'`, or `'9'`. That's why when you do `number[-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'` and `1`, or between `'7'` and `7`.

• ###### André Gonçalvesresolved a question on "Odd or Even?" kata

Thank you for the solution

• ###### André Gonçalvescommented on "Odd or Even?" kata

This comment is hidden because it contains spoiler information about the solution

• ###### hobovskycommented on "Odd or Even?" kata

Because it is not correct.

Without seeing your solution we do not know why it is not correct.

• ###### André Gonçalvescreated a question for "Odd or Even?" kata

Why my solution doesn't work?

• ###### dfhwzecommented on "Odd or Even?" kata

I disagree, checking a number's parity is 8 kyu, checking the parity of the sum of all elements in an array is 7.

• ###### lyko_commented on "Odd or Even?" kata

too easy for 7 kyu

Thanks!

Approved

• ###### Nikidzawaacommented on "Odd or Even?" kata

its 8kyu, not 7

• ###### MikalaiLappocommented on "Odd or Even?" kata

I think it's okay to keep different types as inputs but the description is really off

Given a list of integers

in context of Haskell seems like a literal requirement for the arg to be `[Integer]` type

There should be Haskell-specific description clarifying that input is a list of `Integral` derivative

• ###### natancommented on "Odd or Even?" kata

wouldn'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

• ###### KatrinaKittencommented on "Odd or Even?" kata

Yeah, that's nowhere remotely close to what the kata is supposed to test, which is a problem in itself.