- yes or no?
- Yes or No!
- No E Allowed
- Repetition
- PigLatin I
- Pig Latin II
- Pig Latin III
- Pig Latin Finale
Java String Resources:
Pig Latin Finale
Collapse Content
Show Content
To finish your program, you need to handle sentences, not just words. Create new code that converts each word in a sentence into pig latin and then prints the complete pig latin sentence. For example, when given
"knowledge is power"
your code should print:
"owledgeknay isay owerpay"
Challenge
Convert all the space-separated words in a given String into pig latin and print the pig latin string on its own line.
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.
Comments
zkvarz
Feb 11, 9:48 AMVisual Java Debugger helped me, thanks a lot! I didn't manage to use Eclipse debugger yet but this one is so clear and easy to use!
David
Jun 10, 11:44 AMDead Admin, in the exercise "No E allowed" there was an issue which was corrected where the output was not throwing a single string, i think the issue might be reoccurring here:
By just without any manipulation here is the output:
Correct Output:
aptoplay
owledgeknay isay owerpay
implicitysay isay erequisitepray orfay eliabilityray
aptoplay artay elephantay ingstray
appleay omatotay etchupkay
ingbray
Your Output:
laptop
knowledge
is
power
simplicity
is
Thanks,
David.
Learneroo
Jun 10, 12:15 PM@David, this challenge uses different boilerplate code which gets each line of input instead of single words. Click on "Reset code" to load it, and then replace doStuff with the method you wrote. Print out each line at the end.
David
Jun 10, 12:47 PMUgh my bad... Thanks ! \w/
thales
Jul 18, 9:09 AMBoy oh boy, this was really really hard! and no hints?
A solution is this:
my code
Stanixlav
Oct 28, 1:03 AM...got smoked this time, though.