Question: NEED HELP WITH THIS IN PYTHON #Write a function is_consonant that takes a character and returns True if it is a consonant. #Use your function
NEED HELP WITH THIS IN PYTHON
#Write a function is_consonant that takes a character and returns True if it is a consonant.
#Use your function to create a new function to_piglatin that takes a word, moves all starting consonants (all consonants before the first vowel) to the end of the word, then adds ay to the end and returns the result. You may expect that the input to the function will be just one word. (we know this isn't true pig latin - please do not change this basic algorithm). For a single word input the first letter is capitalized and the rest are lower case as shown in the example below.
#Have the 'to_piglatin' function check whether or not the input is multiple words and return the whole sentence in pig latin. For this you may assume that a sentence always ends with a period and the input is always one sentence, never more than one. Make these changes in the 'to_piglatin' function - that is, if you want to do the extra credit the 'to_piglatin' function needs to work for both a single word and a sentence.
#Examples:
#(format is: function call -> returns)
#to_piglatin('stay') -> aystay #to_piglatin('Jared') -> Aredjay #to_piglatin('and') -> anday #to_piglatin('car') -> arcay
raise NotImplementedError()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
