Skip to content

guyroyse/pig-latin-kata

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

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