[Easy] Completed Project From JetBrains Academy Python Developer Track
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.
With functions, loops, lists and other variables, this is a great project for Python basics. As a cherry on top, it even includes a random module.
- Welcome the user and print 'The game will be available soon.'
- Player will have one chance to guess the word. Learn how to use 'input' and 'if'.
- Randomly choose a word from the list.
- Enable hints in your game. Allow it to show the number of letters and the first three letters. Learn 'slicing'.
- Using a loop, extend the number of attempts to eight.
- 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. Learn 'while' loop.
- 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.
- Create a menu for your game so that players can replay it or exit.