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.
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.
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
This comment is hidden because it contains spoiler information about the solution
Oh brilliant to encode the missing bar versions!
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.
you have defined a
times
function in your code. however, it does not accept arguments. you need to alter yourtimes
function (and others) so that it (they) take(s) arguments.Yeah I mean I have not doing anything about times() function it is one of the test cases
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?
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.