Skip to content

Pig Latin is a way of altering English Words. The rules are as follows: - If a word begins with a consonant, take the first consonant or consonant cluster, move it to the end of the word, and add ay to it. - If a word begins with a vowel, just add way at the end.

Notifications You must be signed in to change notification settings

Nobledsmarts/pig-latin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

pig-latin

Pig Latin is a way of altering English Words.
The rules are as follows:

  • If a word begins with a consonant, take the first consonant or consonant cluster, move it to the end of the word, and add ay to it.

  • If a word begins with a vowel, just add way at the end.

Translate the provided string to Pig Latin.
Input strings are guaranteed to be English words in all lowercase.

Tests

translatePigLatin("california") should return the string aliforniacay.

translatePigLatin("paragraphs") should return the string aragraphspay.

translatePigLatin("glove") should return the string oveglay.

translatePigLatin("algorithm") should return the string algorithmway.

translatePigLatin("eight") should return the string eightway.

Should handle words where the first vowel comes in the middle of the word. translatePigLatin("schwartz") should return the string artzschway.

Should handle words without vowels. translatePigLatin("rhythm") should return the string rhythmay.

About

Pig Latin is a way of altering English Words. The rules are as follows: - If a word begins with a consonant, take the first consonant or consonant cluster, move it to the end of the word, and add ay to it. - If a word begins with a vowel, just add way at the end.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published