Pig latin help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Pig latin help

1. Make a function that returns an integer representing the position of the first vowel encountered in a word. If no vowels are present in the word the function should return -1. 2. Make a function that takes a word as a parameter, translates the word into pig latin and returns the translated word. In piglatin, words that start with vowels end in "way". Words that start with consonants end in that consonant + "ay". If the word starts with a "q" translate the "qu" to the end. Use your function from problem #1. Some examples: hello -> ellohay anchor -> anchorway big -> igbay quick -> ickquay marshmellow -> arshmellowmay apple - > appleway python -> ythonpay 3. Make a program that translates a string into pig latin. Make sure you get the capitalization and punctuation to work. Use your function from problem #2. Sample: Enter a string: The quick brown fox jumped over the lazy dog. Translation: Ethay ickquay ownbray oxfay umpedjay overway ethay azylay ogday.

2nd Feb 2021, 6:52 AM
Kabir Karki
Kabir Karki - avatar
7 Answers
+ 5
First show your attempts!
2nd Feb 2021, 7:37 AM
Abhiyantā
Abhiyantā - avatar
+ 5
Pig Latin answer 👇 sentence = input().split() print(" ".join(w[1:] + w[0] + "ay" for w in sentence))
11th Jun 2021, 2:47 PM
Tharul Nejana
Tharul Nejana - avatar
+ 3
Show your attempt first
2nd Feb 2021, 7:37 AM
Radha🌹
Radha🌹 - avatar
+ 2
Kabir Karki You posted same question three times it is considered as spam delete it as already said by other members show your attempt.
2nd Feb 2021, 9:06 AM
R💠🇮🇳
R💠🇮🇳 - avatar
+ 1
You posted the same question more than once. We can help you but you have to try yourself first. Have a good day !
2nd Feb 2021, 4:36 PM
Hisham YUM 🇲🇦
Hisham YUM 🇲🇦 - avatar
0
Uoye evol I
11th Aug 2022, 1:57 AM
Bruce Nelson
Bruce Nelson - avatar
0
Ellohay angersays
10th Nov 2022, 11:55 PM
Mariah Degener
Mariah Degener - avatar