Kathryn Odell-Hamilton

Modified 8.22.2023

With the help of Dr. Proctor, I reviewed and correct questions #5 and #8.
Question #9 was correct piping, but needed to use file, words_370k.txt.
I learned that the piping commands can be extensive that I thought with
question #9.
_______________________
2023.8.20

Used the pipe commands read from 1 txt file to create new txt files with
parameters and using piping input to get output from
words_100k.txt.

- Unit 2, lab_pipes was different than Unit 1, Turtle because pipes were
composed of 1 line commands to retrieve data from a file or to create
new file(s) of data.

Yes, the thinking from using Pipes is similar to inputting information
when using Searches, edits, or finds within software programs and
internet for information. Also, software dialog boxes. You input some
criteria for an output answer or result.

The pipes used connectors "|" for commands input from the data file to
produce the output, answer to the question. Turtle was overall
simplified with the line-by-line commands to create lines and shapes,
but there was a different complexity with the use of definitions, for
loops, if else statements, and imports.

- Using the Terminal was not difficult because of prior experience using
Terminal within Unit 1, Terminal Adventure, lab_terminal. An idea
would be to expand the "steps" information for finding output of unique
questions. The example line isn't helpful to the more piped steps.

- Yes, I did get stuck when answering the "exercise.md" questions that
didn't have a straightforward answer to the information provided.
I tried to break it down into simplifier steps trying to answer the
bigger question. Questions #5, 8, 9. producing errors.
6 Very abstract using “lessthan 0 1 -e” for words that have 16 or more
letters.

- Yes, I did get stuck when answering the "exercise.md" questions that
didn't have a straightforward answer to the information provided.
I tried to break it down into simplifier steps trying to answer the
bigger question. Questions 5, 8, 9. producing errors.
Question 6 Very abstract using “lessthan 0 1 -e” for words that have
16 or more letters.

- No, I haven't given help to my colleagues because I've been behind
everyone with the assignments. Why. I honestly became busier than
expected teaching ART116, Adobe Photoshop, six-week summer semester
undergraduate course.

- I did go frequently on Discord reading yours and my colleagues
dialog regarding the assignments. It did help me understand more about
Unit 2, lab_pipes, exercise.md.
This commit is contained in:
kathrynoh23 2023-08-22 19:16:41 -04:00
parent 00b4509259
commit 234f872608
1 changed files with 22 additions and 5 deletions

View File

@ -30,15 +30,23 @@ cat words_100k.txt | match "a.*e.*i.*o.*u" | count
8 words have all five vowels (aeiou)
## 5. Which words have two l's in a row, two m's in a row, and two t's in a row? (they don't have to be in that order)
???Nothing prints out, no error messages in terminal.
Corrected. Needed to use file, words_370k.txt
cat words_370k.txt | match "ll" | match "tt" | match "mm"
noncommittally
Used incorrect file, words_100k.txt. Nothing printed out, no error messages in terminal.
cat words_100k.txt | match "l.+l.+m.+m.+t.+t"
cat words_100k.txt | match "ll.+mm.+tt"
cat words_100k.txt | match "l.*l.*m.*m.*t.*t"
There are no words that have two l's, two m's, and two t's each in a row
If using a match separately for each set of the "letters in a row," then a lot of words will match the criteria.
cat words_100k.txt | match "ll"
cat words_100k.txt | match "ll" | match "mm"
cat words_100k.txt | match "mm"
cat words_100k.txt | match "tt"
cat words_100k.txt | match "ll" | match "tt"
cat words_100k.txt | match "ll" | match "tt" | match "mm"
## 6. How many words have sixteen or more letters?
cat words_100k.txt | length | order | put 16 | lessthan 0 1 -e | count
@ -70,7 +78,7 @@ cat words_100k.txt | length | put 10 | equal | count
9869
## 8. What's the longest word which doesn't have any repeated letters?
??? Is this correct
This is correct...
cat words_100k.txt | length | unique 1 | length | equal 0 2 | order
13 abcdeilnprtuy 13 unpredictably
13 abceghiloprty 13 copyrightable
@ -79,10 +87,19 @@ cat words_100k.txt | length | unique 1 | length | equal 0 2 | order
13 acegilmnopsty 13 salpingectomy
## 9. What's the longest word which only uses four different letters?
???tried this, error message. Thinking 4 unique letters
Corrected
cat words_100k.txt | unique |length |put 4 |equal |pluck 3 |length |order
re-read this and write about it..
Prints out all unique letters with 4-letter words with the length in alphabetical order
Note: pluck 3 - selects just the word at index 3
Tried this, error message. Thinking 4 unique letters
How do I change the length to sort "4" unique letters?
cat words_100k.txt | length | unique 1 | length | order -r
cat words_100k.txt | length | unique 1 | length | order -r | head
Scrolled up to see longest word, elns, 13 senselessness
cat words_100k.txt | length | unique 1 | length | order -r | head
cat words_100k.txt | unique
cat words_100k.txt | unique | length
## 10. If you rearrange the letters in "sidebar," what other words can you create?
cat words_100k.txt | match "s.*i.*d.*e.*b.*a.*r"