The Final Project of the CS50P online course – the console version of the Wordle game
This is a final project for HarvardX CS50P course (CS50's Introduction to Programming with Python). This terminal version of the Wordle game was made by Vasilisa Chebotareva.
In this game you should guess the 5-letter word in 6 tries. The word is a singular noun, where letters can be repeated.
After every attempt the user sees colored guess distribution.
- If the letter is in the word and in the right spot, it turns green 🟩
- If the letter is in the word but in the wrong spot, it turns yellow 🟨
- If the letter is not in the word, it turns white ⬜
In this program I tried to prevent potential mistakes and added some features.
- A target word (which user should guess) is picked randomly from the .txt file with 5-letter nouns.
- The user's guess word is checked to be a 5-letter word.
- The user's guess word is checked to be a singular noun in Free Dictionary API.
- Identical letters in words are controlled. For example, in a guess word there are two identical letters (letter a in the word award). The target word is brain. So, in the program the first letter a turns white (not yellow) and the second a turns green (because it is in the right spot).
- After printing the user's name a stopwatch starts and goes till the victory or last try.
- When the game is over, the user can copy guess disrtubution made with emoji.
It's recommended to first create a python virtual environment and then install the requirements with the following command:
pip3 install -r requirements.txt
Then run the command:
python project.py
Python 3.10
- project.py - main file with the game
- test_project.py - three tests of the main program's functions
- five-letter-words.txt - the list with 5-letter nouns.
I would like to express my deepest appreciation to David Malan and the whole CS50 team for entertaining lectures and helpful problem sets.