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.
This was pretty eye-opening to me. I had no idea you could use multiplication with booleans like this. Thanks for the lesson!
TRIM(to_char(cast(hits as float) / cast(at_bats as float), '0.999')) as batting_average
^^^^^^
This worked for me, although it looks sloppy
Format strings with free "bonus" whitespace—that's one of the more ridiculous language "features" I've seen in a while! 😆
This is whitespace. If you wrap your expression in length(), it will show 6 symbols
This is whitespace. If you wrap your expression in length(), it will show 6 symbols
same issue, even though iam outputting with to_char
This comment is hidden because it contains spoiler information about the solution
It's right, but it's not right enough. LOL Also, it is text.
Thanx for advice
Literally no good reason. My initial thought was to just return the length of locals(). This of course doesn't work since the locals() call in this case will always return a dictionary of length 2 containg the args tuple and the kwargs dict. I guess I just had my mind on using locals after that didn't work
Your batting_average column is being output as type 'float', but the puzzle description says it must be a string. The contents of your column (vs the expected column) might look the same, but their functionality is different.
I know, but it is a fun to solve every kata with one-liners :)
I have solved 587 katas and about 98% of them are one-liner solutions :D
Tru same issue
Thanks)