Question: Write a program that accepts a sentence as input and converts each word to Pig Latin. To convert a word to Pig Latin: - If

 Write a program that accepts a sentence as input and converts

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 ethay ieldfay Your program will repeatedly request user input and convert it to Pig Latin until the user just presses ENTER (with no text) to quit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!