Pig Latin Language
Create a program that converts a word into PigLatin.
How it should work:
- A procedure that takes an input and returns a result
- Input should contain atleast 2 words
- If input doesn’t include vowels, or minimum 2 words, return itself (error)
- For each word
o Move all letters before 1st vowel to end of word, then add “ay” to end of word - Return converted words
Examples:
- doPigLatin(graphic please) → aphicgray easeplay
- doPigLatin(graphic) → graphic (error case - only 1 word)
- doPigLatin(good night) → oodgay ightnay