Skip to content

guyroyse/pig-latin-kata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

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

Rules

  • 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.

Hints

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.

About

When in Rome...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published