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.
Your code mutates the input. The kata description says you shouldn't.
Also, I have no idea what you second
if
statement is about.Your whole approach seems to be prone to errors, I'd actually recommend coming back to this one after solving more katas first. Also, when you post code, use proper code formatting, and read this troubleshooting FAQ first.
Literally the first example...
Your code would return False. Your code just removes the asterisk, but it can be replaced with any other string to match the strings, if possible.
Your solution is incorrect, the task isn't so simple. Read the description again, especially the first example. Also, add spoiler flag next time plz.
Because 2 is a prime
why isnt 12 in the array ? is not a prime..
Is 19 a prime?
With 81 fruits in total you could have a subset of fruits that follows the rules in the instructions. In this case, the subset length is 66.