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.
.
Read about Python's identation
wut Traceback (most recent call last):
File "/workspace/default/tests.py", line 1, in
from solution import *
File "/workspace/default/solution.py", line 3
return
IndentationError: unexpected indent
It is your rank. The smaller - the better. The highest kyu is 1.
what is kyu
Okay, so I don't yet know why your code passes the sample tests. Most importantly, your code does not acheive the actual goal of the kata, and so it really shouldn't pass all the sample tests. It's something curious, never seen anyone write what you did... you put an assertion into your function, I have no idea why:
Regardless, you should definitely learn to read your error messages:
Your 1st warning reveals
control reaches end of non-void function
because you do not return a value from your function. You do need to return a Boolean value.Your second warning reveals:
all paths through this function will call itself
because your function contains a call to itself with no exception (exit condition), resulting in infinite recursion.Also, take note that this function receives a value, but your function declaration only shows the type
int
without an actual parameter, which is something you removed for some reason.I passed all tests, but cannot attempt. Why?