Question: Write a function pig latin that takes in a single word, then converts the word to Pig Latin. To review, Pig Latin takes the first

Write a function pig latin that takes in a single word, then converts the word to Pig Latin. To review, Pig Latin takes the first letter of a word, puts it at the end, and appends "ay". The only exception is if the first letter is a vowel, in which case we keep it as it is and append "hay" to the end. E.g. ''boot" ''ootbay", and ''image" ''imagehay". It will be useful to define a list at the top of your code file called VOWELS. This way, you can check if a letter x is a vowel with the expression "x in VOWELS". Remember - to get a word except for the first letter, you can use word[1:]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
