The information of Pig Latin challenge is incomplete:

I solved it, and then I see it did not past the tests,
so I had to arrange the code in order to pass the test, but it will be nice that with the information provided on the challenge it is already enough, like all challenges.

Pig Latin

Pig Latin is a way of altering English Words. The rules are as follows:

If a word begins with a consonant, take the first consonant or consonant cluster, move it to the end of the word, and add ay to it.

If a word begins with a vowel, just add way at the end.

Translate the provided string to Pig Latin. Input strings are guaranteed to be English words in all lowercase.

It looks like you repeated the information from the challenge here. I don’t understand what change you are proposing.

I propose to leave the explanation in the hint, for instance:

You need to create a program that will translate from English to Pig Latin. Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an “ay”. If a word begins with a vowel you just add “way” to the end. It might not be obvious but you need to remove all the consonants up to the first vowel in case the word does not start with a vowel.

As you can see, the explanation from the hint and the explanation from the challenge are different. The explanation from the challenge should suffice to pass the tests at first try, a test failure should not be an input to correct your code in the challenge.

The current description already says to ‘move the consonant cluster to the end’. I don’t understand what you think needs to be added.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.