Question: NO BREAK COMMAND AND USE WHILE LOOPS Create a program that translates English into Pig Latin. The function will take the first letter of each
NO BREAK COMMAND AND USE WHILE LOOPS
Create a program that translates English into Pig Latin.
The function will take the first letter of each word in the sentence only if its a not a vowel, and place it at the end of the word followed by ay.
Your program must be case ins ensitive. You must write the functiontranslate() that takes in a single English word and returns its Pig Latin translation. Remembertranslatemusttakeonlyonewordasinput.
############################################################# # translate() takes a single english word translates it to # pig latin # Parameters: english_word; an English word
# Return: the pig latin translation
Here is some sample output, with the user input in blue. (Yours does not have to match this word for word, but it should be similar.)
linux[0]$ python hw5_part4.py Enter an English phrase: You look nice today I think you meant to say: Youay ooklay icenay odaytay
Enter an English phrase: Again we don't have to worry about punctuation. I think you meant to say: Againay eway on'tday avehay otay orryway aboutay unctuation.pay
Enter an English phrase: I realized that this problem isn't as easy as I had thought. I think you meant to say: Iay ealizedray hattay histay roblempay isn'tay asay easyay asay Iay adhay hought.tay
Enter an English phrase: Owls have 14 vertebrae in their necks. So fancy! I think you meant to say: Owlsay avehay 41ay ertebraevay inay heirtay ecks.nay oSay ancy!fay
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
