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
Because these should be attributes of
Hero
and not methods.Yes, it is. But the instructions are not clear enough.
Just see the initial solution setup. It's a simple method that takes 2 Points.
Uh, I thought it's visible in the language version dropdown in trainer?
This kata is available in Python 3.10.
https://docs.codewars.com/training/troubleshooting#print-input
We don't know which language you are using, we don't know what you are doing and how. Probably you don't catch it where it is needed. Please be more specific if you really want to be helped.
so the order is random?
You assume the values are already ordered.
Yes you can import most standard libraries (unless they are specifically banned by the kata author) .
Just add
import random
at the top of your code as usual, orfrom random import what_you_need
etc.Furthermore - for future reference/other katas - since you're in Python, here's a list of advanced modules you can also import if you need them:
Python packages
catch is a keyword used to handle exceptions and check if the user is using the program wrongly. For more info. you can read the documentation.
Read this: https://docs.codewars.com/training/troubleshooting/#expected-the-same
It's the same in all katas. What you print will be shown as logs, but the tests only control what your function returns.
Which programming language are you using?
What isn't working? What error message or error output are you getting?
The kata has been completed by over 150'000 users, so I really doubt there is an issue. It is most likely an issue in your code, so if you show what you got we can try to help you.
You need to
return
the result, notprint
it