generated from mwc/lab_pipes
	In this assignment I fixed pipeline commands to correctly filter, count, and organize words while fixing errors that I might come across.
I thought this lab was really cool. From Unit 1 it felt different because I was working with using commands such as cat and using the straight line which was totally different from before. The codes from Unit 1 compared to Unit 2 look completely different and more intimadating. In terms of learning, this kind of thinking felt fimiliar becuase I took computing courses that lookk familiar. The way I used terminal felt so different compared to Unit 1 because for Unit 1 it seemed to be more straight torward whereas so far in Unit 2 it has all these other commands seperated with the '|' symbol. Working on this lab made me realize how cool it was to use code to find specific words with specific requirments rather than looking one at a time. I got stuck on the last 3 problems of the exercise and what I did to get unstuck is I messaged one of the students and asked for help. I have just now started getting help from my peers because I have some in my in-person classes so it makes it easier to comunication about the lessons.
This commit is contained in:
		
							
								
								
									
										30
									
								
								exercises.md
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								exercises.md
									
									
									
									
									
								
							@@ -11,31 +11,61 @@ 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 -r | head -n 1`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The longest word is 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 words have two u's in a row 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 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 words have the word "cat" in them`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 4. How many words have all five vowels (aeiou)?
 | 
					## 4. How many words have all five vowels (aeiou)?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					`cat words_100k.txt | match "a" | match "e" | match "i" | match "o" | match "u" | count`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					812 words have all five vowels
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 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, and 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 16 | lessthan -e | count`
 | 
				
			||||||
 | 
					696 words have sixteen or more letters
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 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 -r | head -n 1`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The most frequent 10-letter word is 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?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					`cat words_100k.txt | unique | length 1 | length 1 | equal | order | tail -n 1`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 0 | put 4 | equal | pluck 3 | length | order | tail -n 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?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					`cat words_100k.txt | match "^(?=[abdeirs]{7}$)(?=.*a)(?=.*b)(?=.*d)(?=.*e)(?=.*i)(?=.*r)(?=.*s)"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					braised
 | 
				
			||||||
 | 
					seabird
 | 
				
			||||||
 | 
					sidebar
 | 
				
			||||||
							
								
								
									
										25
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										25
									
								
								poetry.lock
									
									
									
										generated
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
# This file is automatically @generated by Poetry 2.0.0 and should not be changed by hand.
 | 
					# This file is automatically @generated by Poetry 2.1.4 and should not be changed by hand.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "ftfy"
 | 
					name = "ftfy"
 | 
				
			||||||
@@ -201,6 +201,27 @@ files = [
 | 
				
			|||||||
    {file = "regex-2023.6.3.tar.gz", hash = "sha256:72d1a25bf36d2050ceb35b517afe13864865268dfb45910e2e17a84be6cbfeb0"},
 | 
					    {file = "regex-2023.6.3.tar.gz", hash = "sha256:72d1a25bf36d2050ceb35b517afe13864865268dfb45910e2e17a84be6cbfeb0"},
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[package]]
 | 
				
			||||||
 | 
					name = "setuptools"
 | 
				
			||||||
 | 
					version = "80.9.0"
 | 
				
			||||||
 | 
					description = "Easily download, build, install, upgrade, and uninstall Python packages"
 | 
				
			||||||
 | 
					optional = false
 | 
				
			||||||
 | 
					python-versions = ">=3.9"
 | 
				
			||||||
 | 
					groups = ["main"]
 | 
				
			||||||
 | 
					files = [
 | 
				
			||||||
 | 
					    {file = "setuptools-80.9.0-py3-none-any.whl", hash = "sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922"},
 | 
				
			||||||
 | 
					    {file = "setuptools-80.9.0.tar.gz", hash = "sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c"},
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[package.extras]
 | 
				
			||||||
 | 
					check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\"", "ruff (>=0.8.0) ; sys_platform != \"cygwin\""]
 | 
				
			||||||
 | 
					core = ["importlib_metadata (>=6) ; python_version < \"3.10\"", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"]
 | 
				
			||||||
 | 
					cover = ["pytest-cov"]
 | 
				
			||||||
 | 
					doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"]
 | 
				
			||||||
 | 
					enabler = ["pytest-enabler (>=2.2)"]
 | 
				
			||||||
 | 
					test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21) ; python_version >= \"3.9\" and sys_platform != \"cygwin\"", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf ; sys_platform != \"cygwin\"", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"]
 | 
				
			||||||
 | 
					type = ["importlib_metadata (>=7.0.2) ; python_version < \"3.10\"", "jaraco.develop (>=7.21) ; sys_platform != \"cygwin\"", "mypy (==1.14.*)", "pytest-mypy"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[[package]]
 | 
					[[package]]
 | 
				
			||||||
name = "wcwidth"
 | 
					name = "wcwidth"
 | 
				
			||||||
version = "0.2.6"
 | 
					version = "0.2.6"
 | 
				
			||||||
@@ -254,4 +275,4 @@ mecab = ["ipadic (>=1.0.0,<2.0.0)", "mecab-ko-dic (>=1.0.0,<2.0.0)", "mecab-pyth
 | 
				
			|||||||
[metadata]
 | 
					[metadata]
 | 
				
			||||||
lock-version = "2.1"
 | 
					lock-version = "2.1"
 | 
				
			||||||
python-versions = ">=3.10,<4.0"
 | 
					python-versions = ">=3.10,<4.0"
 | 
				
			||||||
content-hash = "3065ca97209e995f56ccc51b98e0a5f9ed082285cd581f3431bec84166f8de05"
 | 
					content-hash = "01051373a28195b84722917aecfef37449c9c460c421c916c9c03ea83ce04ca1"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,7 +9,8 @@ license = {text = "MIT"}
 | 
				
			|||||||
readme = "README.md"
 | 
					readme = "README.md"
 | 
				
			||||||
requires-python = ">=3.10,<4.0"
 | 
					requires-python = ">=3.10,<4.0"
 | 
				
			||||||
dependencies = [
 | 
					dependencies = [
 | 
				
			||||||
    "wordflow (>=0.2.4,<0.3.0)"
 | 
					    "wordflow (>=0.2.4,<0.3.0)",
 | 
				
			||||||
 | 
					    "setuptools (>=80.9.0,<81.0.0)"
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										100000
									
								
								words_100k.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										100000
									
								
								words_100k.txt
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										0
									
								
								words_100k.txt~
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								words_100k.txt~
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										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