Time again for a game script. How it works This is a classic "guess a word" program.
The word to guess is represented by a row of dashes. If the player guess a letter which exists in the word, the script writes it in all its correct positions. The player has 5 chances to guess the word. You can easily customize the game by changing the variables.
Code :
Save this program as “Guess the secret word.py” as shown below:
To start the guessing word, enter the user name.
Now the user can start guessing the word by entering characters, as shown below:
Enjoy it!