Amazing-Python-Scripts

Форк
0

Readme.md

Terminal-games - Hangman

Description

This Hangman game is a simple implementation in Python where the player tries to guess a secret word by suggesting letters within a certain number of attempts. This is a classic word-guessing game that can be played in the terminal.

To compile and run

  • Clone the directory and cd into it.
  • To play Hangman:
    • cd into the hangman folder and run python3 hangman.py

How to play?

  1. The game will start by displaying a series of underscores representing each letter of the secret word. You need to guess the letters and try to complete the word before running out of attempts.

  2. Guess a letter by entering it through the terminal. If the letter is present in the word, it will be revealed in the appropriate position(s). If the letter is not in the word, you will lose one attempt.

  3. Keep guessing letters until you either guess the word correctly or run out of attempts. The game will let you know if you win or lose.

  4. After the game ends, you can choose to play again or exit the program.

Built with - Python 3

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.