Jun-24-2018, 12:36 AM
I have been working my way through projects on Python and now I want to start on hangman. I have not started the code yet because of an issue I am having trouble finding a solution. I want a hangman game where there is a list of random words and a random word is chosen. I want the person to be able to guess a letter and then replace the "_" with that letter at the correct index. For example: The word is "apple" so "_____" but if you guess a then "a____":
I would also like to be able to place a letter in all the times it is in the word like "p" is in apple twice so if guess is "p" it would be "_pp__". I want to try and do all the rest of code myself I just would like to know how to do this small part so I can then apply it.
I would also like to be able to place a letter in all the times it is in the word like "p" is in apple twice so if guess is "p" it would be "_pp__". I want to try and do all the rest of code myself I just would like to know how to do this small part so I can then apply it.