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.
added
As you can see, the meaning of
ans
is not clear for anyone and it's only 3 characters shorter thananswer
. So one might not consider this kind of names worth using in more complicated code. However, I don't think one should care about it in a case like this.I don't get it. Whats wrong with having ans as your variable name?
instead of matching a simple string with +, why didn't you used [a-zA-Z]{4,} ? this way you dont need to test for the word length in the function
its been a year since you included this comment, but the wizard's evil power is also 10, not 11
missing python test cases
using sqrt(n), instead of n/2 was a really clever idea
Probably from Matlab, where
ans
refers to the most recent answer.wow... please dont do this again
'ans' may be a shortname for 'answer'
why 'ans' as the variable name ?