Menu

(Solved) : Write Python Program Without Importing Special Commands Functions Like Import Re Question Q37161446 . . .

Write a python program without importing any special commands orfunctions like import re. The question is attached.PrOBLEM 1. pig.py: a pig-latin translator. Write a program that asks the user for a word and (1) If the word begins with a vo

PrOBLEM 1. pig.py: a pig-latin translator. Write a program that asks the user for a word and (1) If the word begins with a vowel, then the translation is simply the word followed by “way.” (2) If the word begins with a consonant (including the letter “y”), then the translation consists then translates it into pig-latin. The simplest version of the translation is as follows For example, the translation of “one” is “oneway.” of all but the first letter of the word followed by the first letter followed by “ay.” For example, the translation of “boy” is “oybay.” The more complete version of the translation is as follows (1) If the word begins with a vowel, then the translation is simply the word followed by “way.” For example, the translation of “one” is “oneway.” (2) If the word begins with a consonant other than “y,” then all the consonants up to but ex- cluding the first vowel are moved to the end and “ay” is added. For example, the translation of “boy” is “oybay” and the translation of “string” is “ingstray.” example, the translation of “yahoo” is “ahooyay.” example, the translation of “yttrium” is “yttriumway.” (3) If the word begins with “y” followed by a vowel, then treat the “y” as a consonant. For (4) If the word begins with a “y” followed by a consonant, then treat the “y” as a vowel. For There is at least one possible case that is not handled by these rules. You must identify this case in a comment in your program. Figure 1 shows a sample session of repeatedly running my solution. See the Wikipedia article on Pig-Latin at https://en. wikipedia. org/wiki/Pig_Latin for more Show transcribed image text PrOBLEM 1. pig.py: a pig-latin translator. Write a program that asks the user for a word and (1) If the word begins with a vowel, then the translation is simply the word followed by “way.” (2) If the word begins with a consonant (including the letter “y”), then the translation consists then translates it into pig-latin. The simplest version of the translation is as follows For example, the translation of “one” is “oneway.” of all but the first letter of the word followed by the first letter followed by “ay.” For example, the translation of “boy” is “oybay.” The more complete version of the translation is as follows (1) If the word begins with a vowel, then the translation is simply the word followed by “way.” For example, the translation of “one” is “oneway.” (2) If the word begins with a consonant other than “y,” then all the consonants up to but ex- cluding the first vowel are moved to the end and “ay” is added. For example, the translation of “boy” is “oybay” and the translation of “string” is “ingstray.” example, the translation of “yahoo” is “ahooyay.” example, the translation of “yttrium” is “yttriumway.” (3) If the word begins with “y” followed by a vowel, then treat the “y” as a consonant. For (4) If the word begins with a “y” followed by a consonant, then treat the “y” as a vowel. For There is at least one possible case that is not handled by these rules. You must identify this case in a comment in your program. Figure 1 shows a sample session of repeatedly running my solution. See the Wikipedia article on Pig-Latin at https://en. wikipedia. org/wiki/Pig_Latin for more

Expert Answer


Answer to Write a python program without importing any special commands or functions like import re. The question is attached….

OR