Skip to content

Commit d38934d

Browse files
Sync the pig-latin exercise's docs with the latest data. (exercism#185)
1 parent 6ee4d95 commit d38934d

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
11
# Instructions
22

3-
Implement a program that translates from English to Pig Latin.
3+
Your task is to translate text from English to Pig Latin using the following rules:
44

5-
Pig Latin is a made-up children's language that's intended to be confusing.
6-
It obeys a few simple rules (below), but when it's spoken quickly it's really difficult for non-children (and non-native speakers) to understand.
7-
8-
- **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to the end of the word.
5+
- **Rule 1**: If a word begins with a vowel sound, add an "ay" sound to the end of the word (e.g. "apple" -> "appleay").
96
Please note that "xr" and "yt" at the beginning of a word make vowel sounds (e.g. "xray" -> "xrayay", "yttria" -> "yttriaay").
10-
- **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.
7+
- **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 (e.g. "pig" -> "igpay").
118
Consonant sounds can be made up of multiple consonants, such as the "ch" in "chair" or "st" in "stand" (e.g. "chair" -> "airchay").
12-
- **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").
9+
- **Rule 3**: If a word starts with a consonant sound followed by "qu", move them to the end of the word, and then add an "ay" sound to the end of the word (e.g. "square" -> "aresquay").
1310
- **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").
14-
15-
There are a few more rules for edge cases, and there are regional variants too.
16-
Check the tests for all the details.
17-
18-
Read more about [Pig Latin on Wikipedia][pig-latin].
19-
20-
[pig-latin]: https://en.wikipedia.org/wiki/Pig_latin
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Introduction
2+
3+
Your parents have challenged you and your sibling to a game of two-on-two basketball.
4+
Confident they'll win, they let you score the first couple of points, but then start taking over the game.
5+
Needing a little boost, you start speaking in [Pig Latin][pig-latin], which is a made-up children's language that's difficult for non-children to understand.
6+
This will give you the edge to prevail over your parents!
7+
8+
[pig-latin]: https://en.wikipedia.org/wiki/Pig_latin

0 commit comments

Comments
 (0)