anonymous
  • anonymous
Need help!! Write an interactive program that reads lines of input from the user and converts each line into "Pig Latin." Pig Latin is English with the initial consonant sound moved to the end of each word, followed by "ay". Words that begin with vowels simply have an "ay" appended. For example, the phrase The deepest shade of mushroom blue would have the following appearance in Pig Latin: e-Thay eepest-day ade-shay of-ay ushroom-may ue-blay
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
@Hero @snark @kropot72 @Mertsj
anonymous
  • anonymous
@cwrw238
anonymous
  • anonymous
get Input for each word in input if first letter is vowel print word and 'ay' else find first vowel print (from vowel to end) + (from start to vowel) + 'ay' in python this would be easy using slicing, other languages likely similar concepts can be used

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
@msmithhnova like this? import java.util.*; public class PigLatin { public static void main(String [] args) { System.out.println("Type a word "); vowel = ("a,e,i,o,u"); int v = vowel; if(word = "v") { System.out.println("ay"); } else ("find vowel") { } System.out.println("from vowel to end" + "from start to vowel" + "ay"); } }
KonradZuse
  • KonradZuse
You will basically need to delete the first character of a string, and then add ay to the back as well as the first letter.
anonymous
  • anonymous
I'm not familiar with java but the code below will work in python 2.x, not 3.x. It doesn't take into account uppercase vowels, punctuation etc vowels = ['a', 'e', 'i', 'o', 'u'] text = raw_input("Enter some text to convert to piglatin: ") word_list = text.split() for word in word_list: if word[0] in vowels: print word + "-ay", else: index = -1 for char in vowels: i = word.find(char) if i > -1 and index == -1: index = i elif i > -1 and i < index: index = i print word[index:] + '-' + word[:index] + 'ay',
anonymous
  • anonymous
thank you all!!

Looking for something else?

Not the answer you are looking for? Search for more explanations.