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.
@lilsweetcaligula
Actually, the stupid one was me. Although I've read the title which indicates "swap", I've based my solution around the example. in the example, there's only lower case to swap. So I thought (mistakenly) that it was to send all the vowels to upper case. I'm sorry for disturbing you.
@lilsweetcaligula this is really weird, because it shouldn't expect a lower case vowel. Can you take a look at this?
First of all, you code is nice. Congratulations. An improvement (of many) you could do is to test if 'n' is even and equals 2 before the loop (in this case, if it's 2 it is a prime, otherwise it is not). Doing that, 'x' could start from 3 and it could be incremented by two instead of one, because you don't need to verify if it's divisible by another even number. I will be twice as fast (actually, it won't, but you get my point, right?).
This comment is hidden because it contains spoiler information about the solution