Need help coding a simple Hangman game
Hello everybody!
For a class project, I am creating a simple version of Hangman.
The phrase the user has to figure out will be "My teacher is the best."
When it starts out, it will print "-- ------- -- --- ----." Please enter a letter.
I am having some trouble, however, with the script being able to read the letter I enter and replace it with the corresponding hyphen.
So when you type in "e", the script prints out "-- -e---e- -- --e -e--."
And then they enter a "t", it will print out "-- te---e- -- t-e -e-t."
Until each letter is guessed
How do you do that?
|