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.
This comment is hidden because it contains spoiler information about the solution
sorry accidentelly flagged your comment unflagged it.
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
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.
This comment is hidden because it contains spoiler information about the solution
As mentioned above, you can log at certain actions done on the class methods.
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.From the description:
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 atPushover
rank. So, it doesn't meet the criteria for defeat, and returns "intense fight" instead.Also, quoting B4B from a post below:
Yes, training affects experience, and experience affects level:
As I see from your solution, you don't update warrior level every time you add experience.
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.
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.
What information? You can't just say it's lacking information when you don't specify what is lacking.
In the language you used (Python), the kata has been done 1281 times.
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.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