Question: basic python please Lab Description: Write a function that will take in a single, all lowercase word as a parameter and return that word translated
basic python please
Lab Description: Write a function that will take in a single, all lowercase word as a parameter and return that word translated into Pig Latin using the guidelines below: Most words in Pig Latin end in "ay." Use the rules below to translate normal English into Pig Latin. 1. If a word starts with a consonant and a vowel, put the first letter of the word at the end of the word and add "ax." Example:Happy=appyh+ay=appyhay add "ay." 2. If a word starts with two consonants move the two consonants to the end of the word and Example:Child=dc2+ay=dchay 3. If a word starts with a vowel add the word "way" at the end of the word. Example:Awesome=Awesome+way=Awesomeway Sample Data print(topiglatin('gluten')) print(toPigLatin ('famous')) print(topigLatin('alphabet')) print(toPigLatin('function')) print(toPigLatin( 'crusty')) Sample Output utenglay. amousfay alphabetway. unctionfay ustycray. Hints: You might want to write a helper function that returns true if a letter is a vowel (aeiou)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
