When in Rome...
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


When In Rome, Speak Pig Latin

Isthay atakay isway ittenwray entirelyway inway Igpay Atinlay.

Not really. But it is about making English look weird like that.

Your goal is write a function that converts English into Pig Latin. Here's a rules refresher


  • Words that start with a vowel have -way added to the end of them. So, for example, apple becomes appleway.
  • Words that start with a consonant have that consonant placed at the end of the word and -ay added to the end. For example, bear becomes earbay.
  • Words that start with multiple consonants have all the consonants placed at the end and -ay added. So, church becomes urchchay.

That's it.


The algorithm here is actually pretty simple. So, try to take really small steps. Start with single words and then add the ability to translate sentences. Focus on test driving all the vowels individually. Make the tests as tiny as possible.