So no it's go through hangman and try to understand everything we need for so it says create a program
hangman and prompt the user to enter a phrase that phrase will be hidden by a series of dashes.
So already we need we need a way of storing and we'll call it the secret phrase.
And it's phrase not word because it could have like spaces between say and we'll also need the kind
of hidden phrase the one that's hidden by the dashes and that I think that I'll have to be separate
from the secret phrase for reasons we'll get into in a second.
So we need a way of storing let's say the hidden phrase
and with dashes
and again it says excluding spaces.
Right.
So the player can then guess letters.
And if the guests if they guessed correctly all the letters that match will be revealed.
OK.
If they guessed incorrectly then one more bony part will be added to the gallows.
See here it says lose Gallo's should look like this.
So the gallows is where they hang the guy.
And you'll notice that there are six body parts.
So this really means that if they lose and they only have they only had six tries to begin with.
So you need a variable that holds the number of guesses left.
Right.
And set to six initially.
So how many guesses they have left is how many body parts there will be ultimately six in this case.
If the player loses the word should say phrase should be revealed.
And after the game's over the players should be prompted if they want to play again.
It's just like numbered Esser.
So really there's not too much stuff we need to go through with this one but we used to know that we
need to store the secret phrase and also a hidden phrase because we need to be able to check if the
letter matches one of one of the letters in the secret phrase.
Can't do that with just all dashes right.
So that's kind of why we need two different phrases here.
Is this because of this line here.
So it's pretty straightforward.
And in the next lecture we will actually do the top down design of hangman.