What is the goal of this kata? Teaching bad practices?
This input validation is worse than no input validation.
more test coverage on boundaries needed
Swift 5 translation kumited. Please review and approve if acceptable.
If you're doing this much input validation (which I'm not a fan of, but I can set it aside), you're also missing the case where only 1 parameter is provided.
Shouldn't Make sure you round down the XP required for each level up, rounding up will result in the output being slightly wrong. be put inside the description and not at the end? Since it's a crucial piece of information.
Make sure you round down the XP required for each level up, rounding up will result in the output being slightly wrong.
TypeError: xp_to_target_lvl() missing...
That's the call that is making your code to fail. What you're currently lacking to solve your problem is knowledge about function arguments in python. => dig into that.
This comment is hidden because it contains spoiler information about the solution
please can someone explain what this syntax does?
Added random tests to python too.
Your code was effectively... wrong! (you were providing from time to time a string to the randint function).
I found the error, corrected it, and added the fixed tests I suggested below.
This took me forever to get working(not a negative comment, I learned something and had fun), I had a solution but couldn't figure out why I was getting server errors. It turned out to be related to missing arguments, I had the right idea but wrong execution.