hamiltonGomes / hangman_game

This is a simple "Hangman Game" in Python. The player attempts to guess a hidden word, one letter at a time, with a limit of 7 wrong guesses before losing the game.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hangman Game

Prerequisites

Make sure you have Python installed on your system. This project was created in Python 3.

How to play

  1. Download or clone the repository to your local machine.
  2. Navigate to the directory where you downloaded/cloned the project.
  3. Run the game with the following command: python hangman_game.py
  4. Follow the game's instructions. You will be prompted to enter your name, and then the game will start.

Game Rules

  1. The game has a theme of people's names.
  2. You have 7 wrong guesses before losing the game.
  3. Try to guess the hidden word by typing letters.
  4. If you guess all the letters in the word, you win the game.
  5. If you make 7 errors, you lose the game.

Project Structure

  • hangman_game.py: The main code of the game.
  • create_secrets_words.py: Generates secret words and saves them in a secrets_words.txt file.

Technologies and Learning

This project served as an opportunity to practice object-oriented programming in Python. It also demonstrates the utilization of Python features such as file creation, data insertion, and the use of libraries like Faker. The Faker library was employed for generating random names, adding an element of unpredictability and fun to the game.

Author

Hamilton Gomes

Have fun playing! (:

About

This is a simple "Hangman Game" in Python. The player attempts to guess a hidden word, one letter at a time, with a limit of 7 wrong guesses before losing the game.


Languages

Language:Python 100.0%