Skip to content

Update ReadMe For Windows Users #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 35 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,52 @@ 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`

##### create python virtual environment
`vertualenv env`

##### activate virtual environment
`env\scripts\activate`

##### verify
```
python --version
help(pyenchant)
```

##### 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`
40 changes: 21 additions & 19 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down