Well done for getting to step 4. Now in this step
when you take a look at the starting file,
you'll see that I've incorporated a bunch of ASCII art,
so art that's created using strokes of the keyboard.
And you can see that this represents the stages of our hangman game starting from
where they have all six lives and then going down in lives until they have
no more lives, where the hangman character is complete.
This has been included as a list and inside the list
each of these pieces of art is a single string.
So we're going to be printing it out in this step,
and we're going to be using it to give the user feedback.
So the to-dos for step four include creating a variable called lives to keep
track of the number of lives and lives should be equal to six.
Now in the next to-do,
we're checking to see if the guess is actually not a letter in the chosen word,
then we're going to reduce that variable lives by one.
So eventually it's going to step down all the way to zero.
And when that happens, the game should stop and it should print "You lose."
Now, this part is really important because we want the game to stop
when the lives has gone down to zero.
So the code should exit the while loop and print "You lose."
So in addition to winning as a condition to ending the game,
losing is also a condition for ending the game. Now,
the final to do is just to print the ASCII art from stages
which is this list up here,
and the stage should represent the current number of lives
the user has remaining. So this way,
when we actually play the game and we get all the letters wrong,
each time a new piece of the hang man is going to be drawn until eventually we
end up with the entire drawing complete and the game ends,
and it tells us that we lost. If it's helpful,
refer to the flow chart. And once you're ready,
go ahead and fork the starting code and tackle the
to-dos one by one. Good luck and I'll see you on the other side.