Problem 519. Pig Latin to English Translator

Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the Wikipedia entry for Pig Latin):


    * happy → appy-hay
    * question → estion-quay

2. In words that begin with vowels, the syllable "ay" is simply added to the end of the word.

    * another → another-ay
    * about → about-ay

A hyphen is sometimes used to facilitate translation back into English. Ayspray, for instance, is ambiguous, but ay-spray means "spray" whereas ays-pray means "prays."

Given a string in Pig Latin (may be multiple words), produce the English version.

Solution Stats

28.14% Correct | 71.86% Incorrect
Last solution submitted on Aug 23, 2019

Problem Comments

Solution Comments