Hangman is a popular yet grim puzzle game. A cruel computer hides a word from you, which you try to guess letter by letter. If you fail, you'll be “hanged”. If you win, you'll survive. You’ve probably played the game at least once or twice. Now you can actually create this game yourself!
Welcome the user and print “The game will be available soon”.
At this stage, the player will have only one chance to guess the word. Learn how to use “Input” and “if” to implement the most basic version of the game.
Make the game more challenging! Now it will randomly choose one of four words from a list.
Enable hints in your game. Allow it to show the number of letters and the first three letters. Slicing will help you to implement this part.
Using a loop, extend the number of attempts to eight. Now we’re talking!
The outcome of the game may be “fatal”: a feature that makes the game all the more exciting. Work on implementing this feature so that players don’t lose “lives” if they guess the letter correctly. The While loop will help.
Improve the game by handling different error cases. Repetition of a letter, entering words that are too long, or using non-Latin characters shouldn’t cost your player a life.
Dinner at a restaurant starts with the menu; our project ends with one. Create a menu for your game so that players can replay it or exit.