Question: Please clarify lines 7-12 of the attached solution or explain to me step by step how to solve this problem because I'm having trouble with

Please clarify lines 7-12 of the attached solution or explain to me step by step how to solve this problem because I'm having trouble with part i the consonant part.

Please clarify lines 7-12 of the attached

Question 1) (100 pts) Pig Latin is an English language game in which English words are altered according to the following rules: i) If the word begins with one or more consonants, the consonants are moved to the end of the word, and then "ay" is added to the end of the word. For example, "latin" becomes "atinlay", and "smile" becomes "ilesmay" ii) If the word begins with a vowel (ie. a, e, i, o, u or y), "way" is added to the end of the word). For example, "omelet" becomes omeletway and "are" becomes areway". Write a function called pig (word) that takes a string representing a word as a argument and returns a new string that is word translated into pig latin, word should not be modified

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