From 165cad8f255a4d1d4fb43e47b99dc17da287ad15 Mon Sep 17 00:00:00 2001 From: Joe-Sin7h Date: Sat, 28 Nov 2020 22:45:39 +0530 Subject: [PATCH 1/6] Updated ReadMe --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index cd84e3b..e7b9077 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ this python app will find every possible combination and permutation (power sets >which python ##### install modules + >pip install enchant ##### run anagrams solver @@ -24,3 +25,27 @@ this python app will find every possible combination and permutation (power sets ##### deactivate environment >deactivate + +### Windows OS: +##### install virtualenv +>pip install virtualenv + +##### create python virtual environment +>vertualenv env + +##### activate virtual environment +>env\scripts\activate + +##### verify +>python --version + +##### install modules + +>pip install pyenchant + +##### run anagrams solver +###### make sure default python symlink is mapped to python3 (else use python3) +>python app.py + +##### deactivate environment +>deactivate \ No newline at end of file From 376283b6ec50f922cdb7721c68877e1c50526745 Mon Sep 17 00:00:00 2001 From: Jogendra Singh <58473917+Joe-Sin7h@users.noreply.github.com> Date: Sat, 28 Nov 2020 22:48:00 +0530 Subject: [PATCH 2/6] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e7b9077..76ea647 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ this python app will find every possible combination and permutation (power sets ##### verify >python --version +>help(pyenchant) ##### install modules @@ -48,4 +49,4 @@ this python app will find every possible combination and permutation (power sets >python app.py ##### deactivate environment ->deactivate \ No newline at end of file +>deactivate From edcf658e67b4c41d0b66dee0de16f48f67f84679 Mon Sep 17 00:00:00 2001 From: Joe-Sin7h Date: Wed, 2 Dec 2020 22:14:44 +0530 Subject: [PATCH 3/6] Added Exception --- app.py | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/app.py b/app.py index 7277b18..0edd3e3 100644 --- a/app.py +++ b/app.py @@ -39,27 +39,29 @@ def checkifword(word): print("Anagrams Solver App") -letters = input("What 6 letters are you given? ") +letters = input("What 6 letters are you given? ") +if len(letters)<=6: #append all possible outcomes to list -allCombinations.append(letters) -for i in range(6): - five_listed_letters = list(letters) - five_listed_letters.pop(i), five_listed_letters - allCombinations.append(five_listed_letters) - for x in range(5): - four_listed_letters = list.copy(five_listed_letters) - four_listed_letters.pop(x), four_listed_letters - allCombinations.append(four_listed_letters) - for y in range(4): - three_listed_letters = list.copy(four_listed_letters) - three_listed_letters.pop(y), three_listed_letters - allCombinations.append(three_listed_letters) - for z in range(3): - two_listed_letters = list.copy(three_listed_letters) - two_listed_letters.pop(z), two_listed_letters - allCombinations.append(two_listed_letters) - + allCombinations.append(letters) + for i in range(6): + five_listed_letters = list(letters) + five_listed_letters.pop(i), five_listed_letters + allCombinations.append(five_listed_letters) + for x in range(5): + four_listed_letters = list.copy(five_listed_letters) + four_listed_letters.pop(x), four_listed_letters + allCombinations.append(four_listed_letters) + for y in range(4): + three_listed_letters = list.copy(four_listed_letters) + three_listed_letters.pop(y), three_listed_letters + allCombinations.append(three_listed_letters) + for z in range(3): + two_listed_letters = list.copy(three_listed_letters) + two_listed_letters.pop(z), two_listed_letters + allCombinations.append(two_listed_letters) +else: + raise Exception("Length of the Entered String exceeds 6 ") #sort out duplicates in list for i in allCombinations: From 9c58f2e308b43d608e7e297f2b4fb21b1c8a453e Mon Sep 17 00:00:00 2001 From: Joe-Sin7h Date: Wed, 2 Dec 2020 23:05:14 +0530 Subject: [PATCH 4/6] Updated Readme --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 76ea647..3370b57 100644 --- a/README.md +++ b/README.md @@ -3,50 +3,50 @@ this python app will find every possible combination and permutation (power sets ### MacOS: ##### install virtualenv ->python -m pip install --user virtualenv +`python -m pip install --user virtualenv` ##### create python virtual environment ->python -m venv env +`python -m venv env` ##### activate virtual environment ->source env/bin/activate +`source env/bin/activate` ##### verify ->which python +`which python` ##### install modules ->pip install enchant +`pip install enchant` ##### run anagrams solver ###### make sure default python symlink is mapped to python3 (else use python3) ->python app.py +`python app.py` ##### deactivate environment ->deactivate +`deactivate` ### Windows OS: ##### install virtualenv ->pip install virtualenv +`pip install virtualenv` ##### create python virtual environment ->vertualenv env +`vertualenv env` ##### activate virtual environment ->env\scripts\activate +`env\scripts\activate` ##### verify ->python --version ->help(pyenchant) +`python --version` +`help(pyenchant)` ##### install modules ->pip install pyenchant +`pip install pyenchant` ##### run anagrams solver ###### make sure default python symlink is mapped to python3 (else use python3) ->python app.py +`python app.py` ##### deactivate environment ->deactivate +`deactivate` From 43661097df72fdc90f60d11ce9f04cbf90f6763c Mon Sep 17 00:00:00 2001 From: Joe-Sin7h Date: Wed, 2 Dec 2020 23:06:57 +0530 Subject: [PATCH 5/6] updated Readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3370b57..d0f1deb 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ this python app will find every possible combination and permutation (power sets `env\scripts\activate` ##### verify -`python --version` -`help(pyenchant)` +```python --version +help(pyenchant)``` ##### install modules From 749c5d0a5fffd3b3898fb5f8d1df84830c1530cc Mon Sep 17 00:00:00 2001 From: Joe-Sin7h Date: Wed, 2 Dec 2020 23:15:50 +0530 Subject: [PATCH 6/6] Updated Readme.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d0f1deb..9e9ba6a 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,10 @@ this python app will find every possible combination and permutation (power sets `env\scripts\activate` ##### verify -```python --version -help(pyenchant)``` +``` +python --version +help(pyenchant) +``` ##### install modules