Hello, I’ve recently started to learn about Python (for about 2 months), and I need some help to create a word based game, similar to a game called “Wordle”, for this I need to do the following:
Have a secret word stored in the program.
Prompt the user for a guess.
Continue looping as long as that guess is not correct.
Calculate the number of guesses and display it at the end.
Add a check to verify that the length of the guess is the same as the length of the secret word. If it is not, display a message. If they are the same, then proceed to give the hint.
Make sure to account for the following in your hints:
Letters that are not present at all in the secret word (underscore _).
Letters that are present in the secret word, but in a different spot (lowercase).
Letters that are present in the secret word at that exact spot spot (uppercase).
Until now my code looks like this:
I don’t know how to do last parts of the code, the lower.case, upper.case hints, and the error message displayed if the user types the wrong amount of letters.
If someone can help me with this, I will be grateful !