generated from mwc/lab_pipes
Complete the data pipe lab
- One of the big differences is that we didn't write out code in an IDE but rather did it all in the terminal. The process of designing these pipes though drew on the skills of functional programming. - I'm used to writing these kinds of programs in a language like python or java but it's honestly much easier to use the command line tools. - The last exercise tripped me up because I wanted to do it in a way that would for any word, but I wasn't sure how. Is there a way to sort the letters in each word? My solution only works because 'sidebar' doesn't have any repeated letters. - Yeah, I've engaged in the group chat a bit but I don't want to flood the chat. It's hard to gage how helpful my input actually is since we all have differing backgrounds.
This commit is contained in:
27
exercises.md
27
exercises.md
@@ -11,31 +11,56 @@ If you want to be really stylish, put your code inside of backticks like this:
|
|||||||
|
|
||||||
## 1. What is the longest word?
|
## 1. What is the longest word?
|
||||||
|
|
||||||
|
`cat words_100k.txt|length|order|tail -n 1|pluck 1`
|
||||||
|
- antidisestablishmentarianism
|
||||||
|
|
||||||
## 2. How many words have two u's in a row?
|
## 2. How many words have two u's in a row?
|
||||||
|
|
||||||
|
`cat words_100k.txt|match "uu"|count`
|
||||||
|
- 16
|
||||||
|
|
||||||
## 3. How many words have the word "cat" in them?
|
## 3. How many words have the word "cat" in them?
|
||||||
|
|
||||||
|
`cat words_100k.txt|match "cat"|count`
|
||||||
|
- 893
|
||||||
|
|
||||||
## 4. How many words have all five vowels (aeiou)?
|
## 4. How many words have all five vowels (aeiou)?
|
||||||
|
|
||||||
|
`cat words_100k.txt|unique|match "a.*e.*i.*o.*u"|count`
|
||||||
|
- 812
|
||||||
|
|
||||||
## 5. Which words have two e's in a row, two o's in a row, and two k's in a row? (they don't have to be in that order)
|
## 5. Which words have two e's in a row, two o's in a row, and two k's in a row? (they don't have to be in that order)
|
||||||
|
|
||||||
|
`cat words_100k.txt|match "ee"|match "oo"|match "kk"`
|
||||||
|
- bookkeeper
|
||||||
|
- bookkeepers
|
||||||
|
- bookkeeping
|
||||||
|
|
||||||
## 6. How many words have sixteen or more letters?
|
## 6. How many words have sixteen or more letters?
|
||||||
|
|
||||||
|
`cat words_100k.txt|length|put 15|lessthan|count`
|
||||||
|
- 696
|
||||||
|
|
||||||
|
|
||||||
## 7. What's the most frequent 10-letter word?
|
## 7. What's the most frequent 10-letter word?
|
||||||
|
|
||||||
|
`cat words_100k.txt|length|put 10|equal|pluck 2|frequency|order|tail -n 1|pluck 1`
|
||||||
|
- government
|
||||||
|
|
||||||
|
|
||||||
## 8. What's the longest word which doesn't have any repeated letters?
|
## 8. What's the longest word which doesn't have any repeated letters?
|
||||||
|
|
||||||
|
`at words_100k.txt|length|unique 1|length|equal 0 2|order|tail -n 1|pluck 3`
|
||||||
|
-salpingectomy
|
||||||
|
|
||||||
## 9. What's the longest word which only uses four different letters?
|
## 9. What's the longest word which only uses four different letters?
|
||||||
|
|
||||||
|
`cat words_100k.txt|unique|length|put 4|equal|pluck 3|length|order|tail -n 1|pluck 1`
|
||||||
|
-senselessness
|
||||||
|
|
||||||
## 10. If you rearrange the letters in "sidebar," what other words can you create?
|
## 10. If you rearrange the letters in "sidebar," what other words can you create?
|
||||||
|
|
||||||
|
`at words_100k.txt|length|put 7|equal|unique 2|match "abdeirs"|pluck 3`
|
||||||
|
- braised
|
||||||
|
- seabird
|
||||||
|
- sidebar
|
||||||
|
|||||||
100000
words_100k.txt
Normal file
100000
words_100k.txt
Normal file
File diff suppressed because it is too large
Load Diff
1000
words_10k.txt
Normal file
1000
words_10k.txt
Normal file
File diff suppressed because it is too large
Load Diff
1000
words_1k.txt
Normal file
1000
words_1k.txt
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user