- yes or no?
- Yes or No!
- No E Allowed
- Repetition
- PigLatin I
- Pig Latin II
- Pig Latin III
- Pig Latin Finale
Java String Resources:
Pig Latin III
Collapse Content
Show Content
You finished handling vowel-words, so now its time to update the consonant-words. In Pig Latin, all the consonants until the first vowel should be moved to the end of the word. So while "laptop" will still be "aptoplay", "string" should become "ingStray".
Challenge
Change your code so the first "consonant cluster" is moved to the end of the word and "ay" is added after. A word that begin with a vowel or a single consonant should return the same value as before.
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.
Comments
thales
Jul 17, 3:33 PMThis was really hard but here is a solution.
my code
Stanixlav
Oct 27, 3:59 PMHonestly, I have been trying to code something cleaner than thales since I started on Learneroo months ago. Not that it's about competition, but I think I finally may have snuck one past her/him.
https://www.learneroo.com/user_answers/5299786760
Learneroo
Oct 27, 4:34 PMNice :) See also the featured answer I just posted.
Bolke
Jul 13, 6:59 PMIs it a secret where the featured answer is?
Bolke
Jul 13, 7:00 PMBtw nice work, Stanixlav. I couldn't get it done.