Ad
  • Default User Avatar

    I am sure this has probably been brought up before... but You CAN do the calculation with a calculator... it's not an unreasonably large number. The numerical value of this argument: ([4, 3, 6] comes out to 68719476736. That expected result should be 6. Why is this Kata's expected ouput wrong?
    " ([4, 3, 6], 4)) .

  • Default User Avatar

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

  • Default User Avatar

    In the kata description it says this: E. g., with the input [3, 4, 2], your code should return 1 because 3 ^ (4 ^ 2) = 3 ^ 16 = 43046721.

    that looks like a list to me! It did not mention anything about arguments being in the form of both lists or lists within tuples ! why was this information left out?

  • Default User Avatar

    No matter what I do to handle this (I used a recursive function to "flatten" the list), but no matter waht I do, I cannot get ([0,0,0],0) to return the expected 0. It always returns a 1.

  • Default User Avatar

    Are these not nested lists? The arements have arrays within the lists! lists within lists.

    test_data = [
            ([], 1),
            ([0, 0], 1),
            ([0, 0, 0], 0),
            ([1, 2], 1),
            ([3, 4, 5], 1),
            ([4, 3, 6], 4),
            ([7, 6, 21], 1),
            ([12, 30, 21], 6),
            ([2, 2, 2, 0], 4),
            ([937640, 767456, 981242], 0),
            ([123232, 694022, 140249], 6),
            ([499942, 898102, 846073], 6)
    
  • Default User Avatar

    My comment on this kata is that the description is a little mis-leading! Nowhere in the description does it mention that testing will include arguments that hare nested lists! Therefore my current solution gets errors. Does this solution require recursion?

  • Default User Avatar

    This brevity amazes me... it seems like the most efficient solution (though perhaps not as readable) but I do have one question that puzzles me. How does this regular expression determine if the length of s is even or odd? How does it know that it only needs to add a "_" character if the last pair character pairing in the string is solitary?