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.
= "any letters"
what does this code do, I dont get it.
Kind of kicking myself for not having seen this solution.
Whoops. You're right. In every situation it makes more sense to not import sqr. I was getting confused for some reason. Nevermind.
Why would you use sqrt instead of ** in production? Exponent operation is quicker (because a module doesn't need to be imported); it's shorter; a module doesn't unnecessarily need to be imported and you can use exponent operation for nth roots. Apologies, I have no experience in industrial coding, so I'm just curious.
I like this one. It's using the simplest terms, while just as short as the solution that imports sqrt.
In production it would make sense to import sqrt, but given that this is an exercise where you're meant to learn, this method is the best.
???
0 should return True
Exactly my feeling, there must be something that I don't know that I don't know! I'm not even able too come up with a sensible google query for this one!
Short and sweet, no 'from math import sqrt' needed
The description of what constitutes a valid email could be more clear. What are "word characters" as opposed to "letter characters"? Providing more test cases would also have been useful.