Draft

sums of inner lists

Description
Loading description...
Arrays
Algorithms
Mathematics
  • Please sign in or sign up to leave a comment.
  • N2S-Dev Avatar

    i kinda don't understand the question. it's worded weirdly, but i can kind of guess what it wants me to do.

    and the maths seems to be off. for the input [[1, 5, 7, 1], [1, 7], [6], [], [7, 1, 8, 2, 9]], the output should be [15, 13, 15, 3, 9]. however, 1+5+7+1 = 14, not 15. 1+7 is clearly not equal to 13, 6 != 15, etc. the question is quite vague, so i don't really know how to return the output.

    • Chrono79 Avatar

      Check the based on part. It's the first element of the first inner list plus the first element of the second inner list, and so on.

    • N2S-Dev Avatar

      ohhhh that makes so much more sense now. so just add up all the entries of the inner lists that have the same index (so list1[0] is added to list2[0] and so on)? am i understanding this right?

  • monadius Avatar

    I unpublished this kata because it lacks random tests and the JavaScript version is for a different task.

    Please read the following guide for authoring kata in Python.