Browse Source

docs(pig_latin) correct grammar

pull/1110/head
davhojt 2 years ago committed by Dav Hojt
parent
commit
66a4a0cfbf
  1. 14
      subjects/pig_latin/README.md

14
subjects/pig_latin/README.md

@ -2,18 +2,12 @@
### Instructions ### Instructions
Write a **function** that transforms a string passed as argument in its `Pig Latin` version. Create a **function** which transforms the string passed as an argument into Pig Latin:
The rules used by Pig Latin are the following:
- If a word begins with a vowel, just add "ay" to the end. - If a word begins with a vowel, just add "ay" to the end.
- If it begins with a consonant, then we take all consonants before the first vowel and we put them at the end of the word and add "ay" at the end. - If it begins with a consonant, then we take all consonants before the first vowel, move them to the end of the word, and then add "ay" at the end.
- If a word starts with a consonant followed by "qu", move it to the end of the word, and then add an "ay" at the end. - If a word starts with a consonant followed by "qu", move it to the end of the word, and then add an "ay" at the end.
### Notions
- [patterns](https://doc.rust-lang.org/book/ch18-00-patterns.html)
### Expected functions ### Expected functions
```rust ```rust
@ -51,3 +45,7 @@ enonxay
airchay airchay
$ $
``` ```
### Notions
- [patterns](https://doc.rust-lang.org/book/ch18-00-patterns.html)

Loading…
Cancel
Save