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.
Nice!
This comment has been deleted.
I think if you think about this one more, you can do it this way. But I feel like it was so far to type I might as well just write out all the combos I can think of.
Really good use of a dictionary
The comma operator makes age,handicap a tuple to Python. The parenthesis make it a tuple to everyone else.
Regex is actually slower.
Close to mine but I totally forgot about tuple unpacking ...
Interesting solution, but for negative numbers it will give an incorrect result, for example -5 % 2 = -1, so math.abs() is needed
because output is list
it just make a copy
This comment is hidden because it contains spoiler information about the solution
Just like msc3000 said. With more detail; kata itself asks for an array result containing class of each member (data), so in each iteration evaluated adds into the returning array 'Senior' or 'Open' depending on de result of that evaluation. Hope it helps despite my horrible english.
both fantastic and coca colastic
Ok, I asked ChatGPT and it told me that if a: checks if the list is empty or not as an empty list return false and a non-empty list will return true. This is needed becuase min function don't work with empty lists.
How can this code be a best practice? It is at least twice as slow as the mathematical method of calculating the square root of a number
Loading more items...