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
Both of these points are issues, not suggestions.
Not a suggestion.
Not an issue
Not kata issue.
Hint:
/
is different between Python 2 and 3 ;-)Description updated.
It is similarly not made clear that there will be non-alpha entitities (punctuation). That significantly alters things so that some approaches make much less sense.
This comment is hidden because it contains spoiler information about the solution
Yeah, the Python translation may or may not pass an argument through the function - you need a default argument in the function to deal with this.
yeah, i did the same, but still got 'missing 1 positional argument', not sure if it's a bug.
Happy to help :)
In Python2 integer division always returns an integer whilst float divison will always return a float. 25/25 returns an integer, 25/25.0 returns a float. Therefore isinstance(25/25.0, int) will always return false (since it returns a float), and so it is better to use .is_integer().
This is a problem in Python2, however these issues have been fixed in Python3, and Python is now consistent in the way it handles float and integer values.
In Python 2, divison (/) is actually integer divison/floored divison, where it floors to the nearest number see here and here. The result of the division will always be an integer and therefore isinstance will always return true.
You need to cast one of the values to a float.
Why is this an issue? The "Run Suite" tab usually has different & more test cases than the "Run Examples" tab. This Kata is working fine for me. The second testcase in the "Run Suite" is different from the second example testcase. Print the input, print your output, look at the expected output etc. Refresh if it's not working.
Look at the comments down below. As I previously stated:
You need to unpack the arguments which will allow multiple parameters to be passed as a tuple. Also, you need to
return
the value instead ofprinting
it.