Ad
  • Custom User Avatar

    For the puzzle, I tried to go from right to left and checking if the next left digit is larger than the previous one and if so it would replace it. I believe this is my mistake and I am not sure how exactly I should approach this. I am thinking rn if I first go left to right, then right to left repeatly for the length of the string till the number can not be re-oriented to be the smallest digit by swapping with its side numbers. Is this a good approach?

  • Custom User Avatar

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

  • Custom User Avatar

    I tried doing something similar, but an issue came up saying it took way to long and I had to use another solution. Maybe I could have optimized another part for it to work. Anyhow, good work.

  • Custom User Avatar

    Im very confused about the instructions. It says that the mother can see the ball both when falling and bouncing. I am probably overthinking this but does the mother see the ball 2 times when it did one bounce because first it comes up and my understanding is it goes out of view and falls where the condition will apply that she saw the ball counting as 2 times.

    Or is it that the mother can see the ball the whole time it is above the value of the window but the ball goes out of sight as soon as it is lower than the window height? (If so, I would suggest a specification but I am overthinking this then a lot so even without it, it should be fine for most)

  • Custom User Avatar

    Good solution but u didn't really have to use list over str(num) but regardless, still good solution.

  • Custom User Avatar

    I did it! thanks.

  • Custom User Avatar

    I apologize for jumping to conclusions. I see the mistake. I will focus on improving my code and this kata is very interesting and fun in the ways they want you to come up with the information. Just one final question, i have one last error, how would i view the testcase so I can figure out why the error is triggered?

  • Custom User Avatar

    Even after the logging, there are some testcases which aren't possible. One of them asks to output the exp and level being 100 and level 1. Which after it says the battle with a level 7 enemy and return intense battle. How would that be possible? I have checked this like 8 times. Either I'm really stupid or the instructions are written in a unclear manner. I am kinda losing patience with this one, it just doesn't seem that the issue is in my code.

  • Custom User Avatar

    In one of the testcases, they say that the returned value of the exp should be 140 and level 1, then they proceed to fight with a level 9 enemy and say the output should be intense fight.

  • Custom User Avatar

    I tried running test cases and it worked but when I tried to run it through the hidde testcases I got a bunch of unorthodox issues which don't make sense for popping up. I checked my code and some of the information they request is not mentioned in the description. Its not possible to complete this. I believe some of the test cases have incorrect answers given to the testcase, please may someone check this out cause this seems to be a prominent issue.

    IMPORTANT: I checked the testcases and in the description they say they have start values but when the code runs the testcases run as in to act as default values were never to exist and they decide what the Warrior starts with. This is honestly really confusing and an unorganized kata.

  • Custom User Avatar

    I deleted my code since I realized my error and I forgot to delete my comment, apologies for that as when I was trying to delete it for some reason it wasn't showing up.

  • Custom User Avatar

    I am not sure why I am receiving such an error, I believe my code is correct and in VSC it returns the correct outcome but I get an error here. I feel its an easy fix and I can't understand why.

  • Custom User Avatar

    No I agree with Xiji, the description was quite misleading. Understanding that it was passed by a large amount of people doesn't void the fact. The kata should be updated so people in the future could understand it without as much misleading.

  • Custom User Avatar

    Wow, didn't know you could define a function with an output in one line.