Ad
  • Default User Avatar

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

  • Default User Avatar

    sorry accidentelly flagged your comment unflagged it.

  • Default User Avatar

    i think it's because you did not check if bounce was equal to 1, which would cause an infinite loop, the same happened to me

  • Default User Avatar

    I interpret the instructions as she will always see the ball once no matter what because when the kid drops it, it has to pass in front of her before it can hit the ground then every time it bounces she will see it twice, once on the way up and again on the way down for a second bounce. I hope that helps.

  • Custom User Avatar

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

  • Custom User Avatar

    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?

    As mentioned above, you can log at certain actions done on the class methods.

  • Custom User Avatar

    No worries, I was just like you when I was trying to solve this kata. Sat in front of my laptop for minutes, confused, until I realize that there's a rank requirement. I thought the 1 is mentioning level.

  • Custom User Avatar

    From the description:

    However, if your warrior is at least one rank lower than your enemy, and at least 5 levels lower, your warrior cannot fight against an enemy that strong and must instead return "You've been defeated".

    Yes, the level distance is more than 5 (7 - 1 = 6). However, Level 1 and 7 are the same in terms of rank. Both are at Pushover rank. So, it doesn't meet the criteria for defeat, and returns "intense fight" instead.

  • Custom User Avatar

    Also, quoting B4B from a post below:

    the tests are done in order and depends on the history of the instance that is currently tested. So you need to log the different actions to the console to know what happened before.

  • Custom User Avatar

    Yes, training affects experience, and experience affects level:

    In addition to earning experience point from battles, warriors can also gain experience points from training.
    

    As I see from your solution, you don't update warrior level every time you add experience.

  • Custom User Avatar

    Before the level 5 test, there are other tests ran on the warrior instance. Try logging the warrior information (such as rank, level, exp) at battles so that you can confirm whether it's your code's fault or the python test's fault.

  • Custom User Avatar

    Just solved this in Python and ran your solution as well. All the information is in the description. There are no 'unorthodox' issues, you're just not calculating stuff as specified. Take a better look at error messages, they might be a bit eccentric, but they do provide valuable information.

    Not a kata issue.

  • Custom User Avatar

    I checked my code and some of the information they request is not mentioned in the description.

    What information? You can't just say it's lacking information when you don't specify what is lacking.

    Its not possible to complete this

    In the language you used (Python), the kata has been done 1281 times.

    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.

    The description didn't say that the test cases have the start values. It said that the warrior have to start at level 1, rank Pushover, exp 100. It is written in the rules section, meaning that you are the one to implement it. Not the test case.

  • Custom User Avatar

    Without your code, read this: https://docs.codewars.com/training/troubleshooting/#post-discourse there is not much we can do to help you.

    Also, read this to see if your problem is detailed there: https://docs.codewars.com/training/troubleshooting