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.
print()
displays the output to console, so you will see it at the left panel displayed. But there should be an equivalent code likeNone should equal ...
just below the message because you did not return anything back to the function caller, so the value isNone
. If you had bothprint()
andreturn
OTOH, the output will be smtg like: (if your code fails)Otherwise, ...
OP solved it, closing
Why is it showing me different results as I am further indenting print(x) or return x, anybody knows the answer?
vocabulary.com says "Words ending with the suffix -ish are often adjectives, but this suffix has several senses. The suffix -ish is flexibly used with a base word to denote 'somewhat, somewhat prone to, or somewhat like.'"
Booleans are not somewhat true
Instructions are unclear and vague:
"magic_ - a special property as it should be able to handle numbers given with it" should write "magic_ - special instance
and its property is being able to handle numbers given with it"and since it has and underline its not a public but private instance.
"whereami" is also instance and "whoami" is also instance.
You have passed the kata, you know you can forfeit a kata to see solutions don't you? I hope you understood the kata was fine.
It doesnt work fine as it gives error that you cannot call a string with string, it has to be an integer so either that string in square bracket "status" has to be converted to integer or removed completeley. Then it works fine as I have proven it by deleting it in sample test but it shows up again in the hidden full test to which we have no
access. I will skip this kata.
Not a kata issue, your function isn't always returning a string.
Before creating an issue, please, check the kata's Details and see how many solution are for your language:
With that many, there is almost no chance the problem is in the kata.
It is giving me an error for the test code itself.
Unexpected exception raised
Traceback (most recent call last):
File "/workspace/default/.venv/lib/python3.10/site-packages/codewars_test/test_framework.py", line 112, in wrapper
func()
File "/workspace/default/tests.py", line 11, in start_with_one
test.assert_equals(stringy(10)[0],'1',"Whoops your string doesn't start with a '1'")
TypeError: 'NoneType' object is not subscriptable
What's misleading? Do you have a better one?
No, that's not what you should be doing at all, not a kata issue.
It works fine.
I have tried to fix the code by deleting string status in the square brackets before the string busy in the sample code and test worked fine but I cannot
change the code in the hidden test as I got permission denied, therefore this kata is not working fine.
I fixed it by deleting "status" string in sample tests but apparently status string in square brackets is in the full test code which we cannot see.
I would suggest that you google what you need to do currently with the assignment instead of learning theory of the program as you dont need the theory if the task does not require it. Thats the way I am learning Python.
Loading more items...