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.
Still very much a beginner, so my solutions aren't too compact yet :P
It's amazing. WTH!
As a beginner it is amazing to see solutions like this. So much easier than what I did!
Thank you for responding so quickly! I am new to codewars (and coding in general!) and didn't see that replies are collapsed by default, otherwise I would have saw your answer to the same question below. I read through all of the solutions after I complete a Kata but didn't know they could be unlocked prior.
First, what's happening is that your function requires 3 arguments, but it will be called with either 2 or 3 arguments. As in many languages, calling a function with less or more arguments than its required amount will throw an error before anything inside the function runs.
If it's not clear yet, the tip here is that you need to look up how to make that 3rd argument optional. I'll update the description to provide that tip as well since it may not be clear.
Keep in mind that you can still unlock the solutions if you want it spoiled. Honestly, I find reading other people's solutions to the same problem as a useful way to learn.
Also tried Python and got a Traceback error:
TypeError: close_compare() missing 1 required positional argument: 'margin'
I have tried checking to see if the margin variable is None or "" but the error occurs on the input line before any of the function is executed so that is no help
I have also googled to see if there is anyway to make the function work without the 3rd argument but I am having no luck figuring it out. Any help would be appreciated!