Python Wordle Helper Code

ShabirDewji
May 7, 2022

--

Sometimes (actually quite often), after 15 minutes or so, and I am on the 4th guess and I just cannot think of five letter words. I have one green letter, perhaps one or two yellow ones and about 8 black ones. The app I wrote lets you put in all this information and in seconds, it finds you the word(s) that match. It works!

the results were:

These were my first three attempts:

I wrote the app using python flask, and shared it with my family, using pythonAnywhere. I used the enChant dictionary:

https://pypi.org/project/pyenchant/

from nltk.corpus import wordnet
import enchant
d = enchant.Dict(“en_US”)

The code:

https://github.com/shabirdewji/wordle

consist of the main python code in flask_app.py, the routine its calls do_calculations.py, the two html pages — one to accept the input and one to display the results.

--

--