Skip to content

Commit

Permalink
pig-latin: update docs (#2149)
Browse files Browse the repository at this point in the history
[no important files changed]
  • Loading branch information
ErikSchierboom authored Jul 13, 2023
1 parent e141850 commit 2793b16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exercises/practice/pig-latin/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ It obeys a few simple rules (below), but when it's spoken quickly it's really di
- **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to the end of the word.
Please note that "xr" and "yt" at the beginning of a word make vowel sounds (e.g. "xray" -> "xrayay", "yttria" -> "yttriaay").
- **Rule 2**: If a word begins with a consonant sound, move it to the end of the word and then add an "ay" sound to the end of the word.
Consonant sounds can be made up of multiple consonants, a.k.a. a consonant cluster (e.g. "chair" -> "airchay").
Consonant sounds can be made up of multiple consonants, such as the "ch" in "chair" or "st" in "stand" (e.g. "chair" -> "airchay").
- **Rule 3**: If a word starts with a consonant sound followed by "qu", move it to the end of the word, and then add an "ay" sound to the end of the word (e.g. "square" -> "aresquay").
- **Rule 4**: If a word contains a "y" after a consonant cluster or as the second letter in a two letter word it makes a vowel sound (e.g. "rhythm" -> "ythmrhay", "my" -> "ymay").

There are a few more rules for edge cases, and there are regional variants too.
Check the tests for all the details.

Read more about [Pig Latin on Wikipedia][pig-latin].

Expand Down

0 comments on commit 2793b16

Please sign in to comment.