Question: Write a program that encodes English-language phrases into pig Latin. To translate an English word into a pig Latin word, place the first letter of
Write a program that encodes English-language phrases into pig Latin. To translate an English word into a pig Latin word, place the first letter of the English word at the end of word and add "ay". For example, "dog" would become "ogday" and cat would become "atcay".
Your program should prompt the user to enter an English sentence and then print the sentence with every word changed to pig latin. (One way to do tis would be to split the sentence into words with the split() method.) For simplicity, there will be no punctuation in the sentences.
Run like:
Enter a string to be translated: the fox jumps over the lazy dog
hetax oxfay umpsjay veroay hetay azylay ogday
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
