Question: Python v3 with wing ide Write a Python module called piglatin.py that contains functions for translating sentences between English and a variant of Pig Latin

 Python v3 with wing ide Write a Python module called piglatin.py
that contains functions for translating sentences between English and a variant ofPython v3 with wing ide

Write a Python module called piglatin.py that contains functions for translating sentences between English and a variant of Pig Latin (see: http://en.wikipedia.org/wiki/Pig_Latin). To convert from English to Pig Latin, each word must be transformed as follows if the word begins with a vowel, 'way should be appended (example: 'apple' becomes appleway) if the word begins with a sequence of consonants, this sequence should be moved to the end, prefixed with 'a' and followed by 'ay (example: please' becomes 'easeaplay') NB: Assume, when reverting Pig Latin to English that the original English text does not contain the letter "w". The Python module will contain the following functions: to pig_latin (sentence) Return the Pig Latin sentence for a given English sentence. to english (sentence) Return the English sentence for a given Pig Latin sentence. A main program called 'plmodtest.py' has been provided. Use this to test your program. (Note plmodtest must not be modified.) Sample I/O: (E) nglish or (P) ig Latin? Enter an English sentence: the quick black fox jumps over the lazy apple Pig-Latin: eathay uickaqay ackablay oxafay umpsajay overway eathay azyalay appleway

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!