Line-by-Line Python Project Walkthrough - Wordle Clone in Terminal! - wordle.plus

Line-by-Line Python Project Walkthrough – Wordle Clone in Terminal!

Replit
Views: 25989
Like: 357
50 lines of code is all we need to create this Wordle clone. With Replit and Python this is an easy process with no installs on your local PC. In this Python tutorial we cover every line of code so you understand and can start creating your own projects.

Want more Python tutorials? Want this same tutorial in JavaScript? Anything else let us know in the comments below.

Forked version of the code:
Original code:

11 Comments

  1. One small bug to point out in this code! We want to make sure everything is in lowercase from the NLTK library. I have fixed this in the forked Repl see line 28.word = random.choice(words_five).lower()

  2. 2 requests:

    1. Check the 'guess' to ensure that it is a real word (that is 'in' words_five)

    2. The feedback is somewhat flawed. If the word is SUGAR and you guess SWISS, all 3 's' turn green/yellow, even though the solution only has one. That would be more challenging to fix.

    Thanks for providing this!!!

    edit: 'green/yellow'

  3. Great video! Yet I’m still wondering how to cope with duplicate letters. For example, if the given word is PEACH and you guess APPLE, only one P should be colored yellow.

  4. Thats great! Thank you so much! There is a small issue…
    When you guess a repetative letter, it also turned yellow.

    Let say the wordle is "small", and your guess is "mimic" there are two yellow m… How can I fix that?

  5. CAN SOMEOE HELP ME WITH, how can I detect and print if player inputs more or less letters then the chosen words letter.?

  6. I'm using Visual Studio Code for this and the only problem is for the "termcolor" part saying (Import "termcolor" could not be resolved from source Pylance(reportMissingModuleSource)

  7. I'm having some trouble with line 6 when I do "as f:" it doesn't recognize f does anyone have any advice?

  8. line 28 is saying red on it when i did the axact thing u told me ?

  9. The main issue with this code is that it doesn’t have an answer to duplicate letters. So if the word is shark, and my guess is sassy, it would say the first S is green and the other two are yellow. We only want it to mark duplicate letters if the correct word actually has duplicate letters, otherwise they need to be grey.

Leave a Reply

Your email address will not be published. Required fields are marked *