You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Towards the end of the development of the game "Hanged Man" we had to go back and print each time one of the status images of the hanging man, depending on the number of wrong guesses the player guessed.
5
+
6
+
For this purpose, follow the following instructions:
7
+
8
+
Define a constant variable called HANGMAN_PHOTOS. The variable is of dictionary type (dict) and must hold the seven states of the hanging man (which you encountered in the unfolding task at the end of Unit 1).
9
+
Write a function called print_hangman defined as follows:
10
+
def print_hangman(num_of_tries):
11
+
The function prints one of the seven states of the hanging man, using:
12
+
A variable called num_of_tries that represents the number of failed attempts by the user so far.
0 commit comments