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.
Thank you very much for your reply! Really apreciate it!
Will try to modify it :)
Welcome to Codewars! I've tried to explain the basics in detail for you.
1.) You need to return the output statement, not print it to the console using print(). Use the reserved word
return
instead of print(). All Katas on this website work by returning the output statement.Programming functions behave like mathematical functions where they require an input and give their output. The parameters serve as the input and the statement you return serves as the output. This is required so you can get a return value from the calling of the function. This means you can expected a certain return value from the function, leading to equality checks through testing via testcases.
2.) You need to change "win" to "won" in all the statements.
3.) You need to consider draws - in which player1 and player2 have the same input (player1 == player2).
4.) I suggest using "==" instead of "is" when checking equality (read stuff like http://stackoverflow.com/questions/2239737/is-it-better-to-use-is-or-for-number-comparison-in-python)
5.) You can remove the default values for the parameters. The default values you put is tuple containing the choices (a fixed collection of items) and if no parameters are entered, it will use the tuple and won't pass any if statements.
This comment is hidden because it contains spoiler information about the solution