Question: . Write a function called pig _ latin ( ) that takes a word and converts the word to Pig Latin. This function takes a

. Write a function called pig_latin() that takes a word and converts the word to Pig Latin.
This function takes a string, and returns a string. That is, it takes the first letter off the front of a
word and places it at the end of the word followed by the letters 'ay'. However, if the first letter
is a vowel, then it's not moved to the end, but you still at 'ay' to the end of the word.
Signature:
def pig_latin(word):
# your code here
return
Assumptions: The word is non-empty.
Examples:
pig_latin('weekend')-> 'eekendway' #eekendway
pig_latin('coffee')-> 'offeecay' #offeecay
pig_latin('indoors')-> 'indoorsay' #indoorsay

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 Programming Questions!