English
English, 16.10.2020 14:01, colbygreen6189

Pig Latin is childish encoding of English that adheres to the following rules: 1. The vowels are 'a', 'e', 'i', 'o', 'u', as well as any 'y' that is not the first letter of a word. All other letters are consonants. For example, 'yearly' has three vowels ('e', 'a', and the last 'y') and three consonants (the first 'y', 'r', and 'l').
2. If the English word begins with a vowel, append 'hay' to the end of the word to get the Pig Latin equivalent. For example, 'ask' becomes 'askhay, 'use' becomes 'usehay'.
3. If the English word starts with 'q', assume it is followed by 'u'; move 'qu' to the end of the word, and append 'ay'. Hence 'quiet' becomes 'ietquay', 'quay' becomes 'ayquay'.
4. If the English word begins with a consonant, move all the consonants up to the first vowel (if any) to the end and add 'ay'. For example, 'tomato' becomes 'omatotay', 'school' becomes 'oolschay', 'you' becomes 'ouyay', and 'h' becomes 'hay'.

Required:
Your goal is to write a function pigify that take a single English word (e. g. a string with only letters and no spaces), and converts it into Pig Latin.

answer
Answers: 1

Other questions on the subject: English

image
English, 21.06.2019 21:30, heatherswiffin666
Plzzz me needs a hyphen or no hyphen 1. laura, a friendly little girl, says hello to everyone she passes 2. my uncle is well known jazz musician 3. our school's winning football record is welll known 4. the angry looking woman was having a heated discussion with the store manager.
Answers: 2
image
English, 22.06.2019 01:20, jayme2407
Public opinion polls are used in marketing
Answers: 1
image
English, 22.06.2019 05:30, SRTBANDIT6045
Which adjective best describes the narrators father according to the narrator
Answers: 1
image
English, 22.06.2019 06:00, jennsou
How does gregor sanaaโ€™s identity change as the novella progresses?
Answers: 1
Do you know the correct answer?
Pig Latin is childish encoding of English that adheres to the following rules: 1. The vowels are 'a...

Questions in other subjects: