Ad
  • Custom User Avatar

    And a perfect example of ChatGPT answering the prompt correctly and you misreading it. He specifically wrote "I asked ChatGPT to explain this code ... and got exactly what he asked for.

  • Default User Avatar

    you can look at the test section to figure out that it doesn't tho. for context this is what is shown:
    {'t','u','p'},
    {'w','h','i'},
    {'t','s','u'},
    {'a','t','s'},
    {'h','a','p'},
    {'t','i','s'},
    {'w','h','s'}

    a lot of katas here have confusing instructions so i often look at the test section first before i start coding just to make sure i understand the instructions

  • Custom User Avatar

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

  • Custom User Avatar

    Oh brilliant to encode the missing bar versions!

  • Custom User Avatar

    I can only speak for myself, but I had originally used itertools.permutation() to split the given number into an array of all of its permutations and then sort through to find the lowest number greater than the original. This worked for the test cases but not when I actually attempted since really large numbers timeout as this algorithm is super inefficient.

    So I changed the whole gameplan and simply forgot to change the 'import itertools' line at the top.

  • Default User Avatar

    you have defined a times function in your code. however, it does not accept arguments. you need to alter your times function (and others) so that it (they) take(s) arguments.

  • Custom User Avatar

    Yeah I mean I have not doing anything about times() function it is one of the test cases

  • Custom User Avatar

    I can't get around the need for arguments. In order to pass in the operation functions into the first number, we need to require an argument. But since the second number doesn't take an argument, we can't require one.... So do we have to write two functions for each number?

  • Custom User Avatar

    This is very poorly worded, imo. It's not clear that we will be given multiple triplets containing the same letters from the string. Like 'howareyou' could have the triplets: 'hwr', 'wae', 'hyo', 'wry', etc. The way it's worded made it seem like each letter would only show up in ONE of the triplets, which would be nearly impossible to solve.