Pig Latin Translator

From WLCS
Revision as of 14:20, 5 January 2009 by Admin (talk | contribs)

Objective:

  • You will create a program that translates English to Pig Latin

Translation Rules:

  1. If a word has no letters, don't translate it.
  2. All punctuation should be preserved.
  3. If the word begins with a capital letter, then the translated word should too.
  4. Separate each word into two parts. The first part is called the prefix and extends from the beginning of the word up to, but not including, the first vowel. (The letter y will be considered a vowel.) The Rest of the word is called the stem.
  5. The Pig Latin text is formed by reversing the order of the prefix and stem and adding the letters ay to the end. For example, sandwich is composed of s + andwich + ay + . and would translate to andwichsay.
  6. If the word contains no consonents, let the prefix be empty and the word be the stem. The word ending should be yay instead of merely ay. For example, I would be Iyay.

Directions: