Pig Latin II


Collapse Content

If the first letter in a word is a vowel (a,e,i,o,u), you should leave it where it is and just add "ay" to the end of the word. For example, "Art" should become "Artay". Modify your previous code so it handles vowel-words correctly.

Note: In Java you can get the lowercase version of a character with the following code:

char ch = 'A'
ch = Character.toLowerCase(ch); 

Challenge

Modify your previous code so vowels at the beginning of words remains in place. Other words should be returned as before.

Please sign in or sign up to submit answers.

Alternatively, you can try out Learneroo before signing up.

Comments

Contact Us
Sign in or email us at [email protected]