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.
Haskell and Crystal are using strict equality with floating-point numbers
approved
I suppose it depends on what you define as higher-level math. To me that starts with possibly trig, I'd say probably calc, and certainly beyond that. But this is high school geometry at best.
Really!
Oh really? And in what grade was this taught? Funny, in Europe we study a higher level of math anyway.
but it simply is not high level math ..?
Could you rewrite the description for someone who hasn't taken high level math in college? Oh and I passed a geometry/trigonometry exam to get into Engineering, so please don't tell me this is easy to understand.
approved
that's a correct test but it is poorly presented both by the test output and by your print. from your message one might think that test case is a string of length 5, but that is not the case. when you outright print a string you are displaying it as text but that is not what you are interested in, you should instead be considering the precise content of the string.
test case: $1.23
Error: 123 should equal None
Above error should not occur as 123 is the correct answer, so this test case is faulty
Ahhhh, there's always someone who have done the kata with one-liner solutions while I spent 30 minutes...hard to be a newbie in coding
Thanks for this one — really enjoyed it!
Nice little regex workout with just enough edge cases to keep things interesting.
Always fun solving something short and satisfying like this
A valid time with a trailing newline (e.g.
'12:30:00\n'
) should be added as a fixed test. Many solutions use regex patterns like/^([0-1]\d|2[0-3])(:[0-5]\d){2}$/
, but the'$'
token matches on different things depending on language, notably Python and Java, which will match the position before a terminal newline as well as the end of the string. Also, annoyingly, just replacing the'$'
with'\Z'
isn't always effective, as in Python,'\Z'
matches only the end of the string, while in Java it's just a synonym for'$'
.Java translation!
After doing so many Python Kata and learning from one-liner solutions, I'm happy that I can now have one-liner solutions equivalent to these :D
Loading more items...