Question: PLE HELP ME BY PYTHON PLE HELP ME BY PYTHON Pig Latin Write a program that accepts a sentence as input and converts each word
PLE HELP ME BY PYTHON

PLE HELP ME BY PYTHON
Pig Latin Write a program that accepts a sentence as input and converts each word to "Pig Latin." To convert a word to Pig Latin: If the word begins with a vowel, add "way" at the end of the word. Otherwise, move all the consonants from the beginning of the word to the end, and append "ay" to the string. For the purposes of this program, a, e, i, o, u, and y are all considered as vowels. You may convert the output to all lower case and ignore all punctuation (other than spaces). Here are some examples of input and output: Python is a programming language-ythonpay isway away ogrammingpray anguagelay Your strong ox plows the field yourway ongstray oxway owsplay ethayieldfay Your program will repeatedly request user input and convert it to Pig Latin until the user just presses ENTER (with no text) to quit. Extra credit 1: if a word begins with a capital letter, make sure the translated word also begins with a capital. Example: Grover Cleveland was a President - Overgray Evelandclay asway away Esidentpray Extra credit 2: Handle the letter y better. If y is the first letter of the word, as in yes or yacht, treat it as a consonant. Otherwise, treat it as a vowel, as in style or mystery. (This rule will fail on words of foreign origin such as yttrium and Yggdrasil.) Extra credit 3: Handle words beginning with qu correctly. As stated in the original rules, the algorithm would improperly change quest to uestqay instead of the correct estquay
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
