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.
It is not totally bad, but has some performance cave-ats which could be potentially improved.
For example, how many times the
s.lower()
is called? It also does a lot of unnecessary work for inputs like"A" * 1000 + "B" * 1000 + "C" * 1_000 ... + "Z" * 1_000
.I see what you're saying ~ I apologize I didn't undertsand sooner. So, when I designed this kumite I was conceptulizing a very simple
str
formating exercise where the user had to strip dashes (-
) from the input paramter before searching within the given constantPI
(in the preloaded section) which only contains1 million
decimals. So becausse this givenPI
constant isfinite
, there are combinations of6-8
digit numbers not found within it, as proven with the test cases. However, I concede to your point, true PI is infinte, and would be difficult to prove if a 6-8 digit number exitsed within it! Again, I apprecate the feedback!Thanks for your feedback! Help me uderstand how does your code test for
birthday
inPI
? The input paramter is astr
, and your code will returnsTrue
no matter what the input argument is. For example, if the input value was "foo
", then this code would returnTrue
, which isFalse
because "foo
" is not inPI
, correct? Let me know if I am missing anything. Again, thanks for your feedback! ~ Respectfully.